--- /usr/portage/app-misc/g15daemon/files/g15daemon-1.2.7.initd 2007-02-18 20:38:16.000000000 +0100 +++ /etc/init.d/g15daemon 2007-10-01 13:08:30.000000000 +0200 @@ -13,26 +13,29 @@ start() { ebegin "Starting g15daemon" # Does the input device already exist? - if [[ -e /proc/modules && ! -e /dev/input/uinput ]] ; then + if [ -e /proc/modules -a ! -e /dev/input/uinput ]; then # We can load modules, but uinput device does not exist einfo "Loading uinput module" - /sbin/modprobe uinput &> /dev/null + /sbin/modprobe uinput > /dev/null 2> /dev/null fi local SWITCHKEY="" - [[ ${CLIENT_SWITCH_L1} = "yes" ]] && SWITCHKEY="--switch" + test $CLIENT_SWITCH_L1 = "yes"&&SWITCHKEY="--switch" + #[[ ${CLIENT_SWITCH_L1} = "yes" ]] && SWITCHKEY="--switch" start-stop-daemon --start --background --pidfile /var/run/g15daemon.pid \ --exec /usr/sbin/g15daemon -- ${SWITCHKEY} eend $? "Failed to start g15daemon." } stop() { ebegin "Stopping g15daemon" local KILLOPT="-k" - [[ ${BACKLIGHT_OFF} = "yes" ]] && KILLOPT="-K" - /usr/sbin/g15daemon ${KILLOPT} 2&> /dev/null \ + if [ $BACKLIGHT_OFF = "yes" ]; then + KILLOPT="-K" + fi + /usr/sbin/g15daemon ${KILLOPT} >/dev/null 2> /dev/null&&wait `cat /var/run/g15daemon.pid` \ || start-stop-daemon --stop --quiet --pidfile /var/run/g15daemon.pid eend $? }