webdevnz wrote:[
Hi there.
What modifications did you make and how where they implemented in order for this to start, I'm having the same issue.
Cheers
Here's the patch for the S20dbus script in /opt/etc/init.d
- Code: Select all
--- ./S20dbus 2010-11-09 11:04:46.000000000 -0800
+++ ./S20dbus 2010-12-07 12:36:11.778290580 -0800
@@ -23,7 +23,7 @@
set -e
DAEMON=/opt/bin/dbus-daemon
-NAME=dbus
+NAME=`basename $0`
DAEMONUSER=messagebus
PIDDIR=/opt/var/run/dbus
PIDFILE=$PIDDIR/pid
@@ -47,8 +47,17 @@
chown $DAEMONUSER $PIDDIR
chgrp $DAEMONUSER $PIDDIR
fi
+
if [ -e $PIDFILE ]; then
- echo "$DESC already started; not starting."
+ if [ -n "`pidof dbus-daemon`" ]; then
+ echo "$DESC already started; not starting."
+ else
+ echo "$PIDFILE exists! but deamon is not running. Removing $PIDFILE..."
+ rm -f $PIDFILE
+ echo -n "Starting $DESC: "
+ ${DAEMON} --system $PARAMS
+ echo "$NAME."
+ fi
else
echo -n "Starting $DESC: "
${DAEMON} --system $PARAMS
If you want the full script just download any of the links in the first post and it will be in there. It's in the opt_etc_initd_scripts directory.
Now let me ask you a question: How are you ensuring that your scripts in /opt/etc/init.d are called during boot/init? There's a the method shown in the QNAP wiki where you add an autorun.sh script to the flash RAM. I'm not a huge fan of this method because of timing issues. The /opt directory probably won't exist when the autorun script executes or if it does then other things that your script might need to have running will not be running. I'm a much bigger fan of modifying the Optware.sh script in /opt to run all the script in /opt/etc/init.d.
So even if you patch your S20dbus script with my patch you still need to make sure it's called during boot/init.
Regards,
Anthony
News