Thread: Problem with /etc/rc.local
hi guys new here in fact first post here heres problem
trying make script saves time , date @ when computer restarts
heres have done far
saved restart.sh ,made sure executeable , /etc/rc.local file looks like#!/bin/bash
sudo touch /var/log/restart.txt
su root
sudo last reboot > /var/log/restart.txt/
now problem not overwriting restart.txt file new restart time , date#!/bin/sh -e
#
# rc.local
#
# script executed @ end of each multiuser runlevel.
# make sure script "exit 0" on success or other
# value on error.
#
# in order enable or disable script change execution
# bits.
#
# default script nothing.
/home/pc/restart.sh
exit 0
dont know please guys me 1
will script run manually? looks there mistake in last line.
line
sudo last reboot > /var/log/restart.txt/
should read
sudo last reboot > /var/log/restart.txt
Forum The Ubuntu Forum Community Ubuntu Official Flavours Support General Help [ubuntu] Problem with /etc/rc.local
Ubuntu
Comments
Post a Comment