/etc/rc.local not running contents on boot
Admin
admin at enabled.com
Mon Jul 20 04:05:13 UTC 2009
Hi there,
I am finding that the contents of /etc/rc.local are not getting executed
at reboot time. I am trying to figure out why. When I run
/etc/rc.local as root things run fine. What is going on here?
username at harmonize-desktop:~$ ls -l /etc/rc.local
-rwxr-xr-x 1 root root 549 2009-07-18 00:30 /etc/rc.local
username at harmonize-desktop:~$ ls -l /etc/init.d/rc.local
-rwxr-xr-x 1 root root 788 2009-03-31 02:01 /etc/init.d/rc.local
username at harmonize-desktop:~$
$ cat /etc/rc.local
#!/bin/sh
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
# the Simplifymedia Server going
/usr/bin/killall SimplifyPeer
cd /home/username/simplifymedia
su username ./simplifyserver.sh > ./simplifyserver.sh.log 2>&1
#start streamripping
su username /home/username/bin/stream.grab.sh
# knock daemon
/root/knock-daemon
exit 0
$ cat /etc/init.d/rc.local
#! /bin/sh
### BEGIN INIT INFO
# Provides: rc.local
# Required-Start: $remote_fs
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-Stop:
# Short-Description: Run /etc/rc.local if it exist
### END INIT INFO
PATH=/sbin:/usr/sbin:/bin:/usr/bin
. /lib/init/vars.sh
. /lib/lsb/init-functions
do_start() {
if [ -x /etc/rc.local ]; then
[ "$VERBOSE" != no ] && log_begin_msg "Running local
boot scripts (/etc/rc.local)"
/etc/rc.local
ES=$?
[ "$VERBOSE" != no ] && log_end_msg $ES
return $ES
fi
}
case "$1" in
start)
do_start
;;
restart|reload|force-reload)
echo "Error: argument '$1' not supported" >&2
exit 3
;;
stop)
;;
*)
echo "Usage: $0 start|stop" >&2
exit 3
;;
esac
More information about the ubuntu-users
mailing list