--- quasselcore.init.old 2008-08-28 20:46:42.000000000 +0200 +++ quasselcore.init 2008-08-29 19:23:23.000000000 +0200 @@ -9,14 +9,21 @@ start() { ebegin "Starting Quassel Core" - start-stop-daemon --start --user $QUASSEL_USER --background --make-pidfile \ - --pidfile /var/run/quassel.pid --exec /usr/bin/quasselcore -- ${QUASSEL_OPTS} + if [ -x /etc/init.d/root ]; then + # running on baselayout-2/openrc + start-stop-daemon --start --user ${QUASSEL_USER} --background --make-pidfile \ + --pidfile /var/run/quassel.pid --exec /usr/bin/quasselcore -- ${QUASSEL_OPTS} + else + # running on baselayout-1 + start-stop-daemon --start --chuid ${QUASSEL_USER} --background --make-pidfile \ + --pidfile /var/run/quassel.pid --env HOME="/home/${QUASSEL_USER}" \ + --exec /usr/bin/quasselcore -- ${QUASSEL_OPTS} + fi eend $? } stop() { ebegin "Stopping Quassel Core" - start-stop-daemon --stop --user $QUASSEL_USER --pidfile /var/run/quassel.pid \ - --exec /usr/bin/quasselcore + start-stop-daemon --stop --pidfile /var/run/quassel.pid --exec /usr/bin/quasselcore eend $? }