--- ../splashutils-gentoo-0.5.1/splash-functions.sh +++ splash-functions.sh @@ -62,7 +62,7 @@ local args=($@) if [[ ${event} == "rc_init" || ${event} == "rc_exit" ]]; then - args[${#args[*]}]="${RUNLEVEL}" + args[${#args[*]}]="${SOFTLEVEL}" fi splash_profile "pre ${event} ${args[*]}" @@ -79,8 +79,8 @@ svc_stopped) splash_svc "$1" "$2" "stop";; svc_input_begin) splash_input_begin "$1";; svc_input_end) splash_input_end "$1";; - rc_init) splash_init "$1" "${RUNLEVEL}";; - rc_exit) splash_exit "${RUNLEVEL}";; + rc_init) splash_init "$1";; + rc_exit) splash_exit ;; critical) splash_verbose;; esac @@ -197,7 +197,8 @@ # Make sure the splash daemon is really dead (just in case the killall # in splash_cache_cleanup didn't get executed). This should fix Gentoo # bug #96697. - killall -9 splash_util.static >/dev/null 2>/dev/null + start-stop-daemon --quiet --stop --exec "${spl_util}" --pidfile "${spl_pidfile}" + rm -f "${spl_pidfile}" } splash_start() { @@ -243,8 +244,8 @@ umount ${spl_tmpdir} fi - # In the unlikely case that there's a splash daemon running -- kill it. - killall -9 ${spl_util##*/} 2>/dev/null + start-stop-daemon --quiet --stop --exec "${spl_util}" --pidfile "${spl_pidfile}" + rm -f "${spl_pidfile}" # Prepare the communications FIFO mkfifo ${spl_fifo} @@ -522,8 +523,9 @@ splash_cache_cleanup() { - # FIXME: Make sure the splash daemon is dead. - killall -9 splash_util.static >/dev/null 2>/dev/null + # Make sure the splash daemon is dead. + start-stop-daemon --quiet --stop --exec "${spl_util}" --pidfile "${spl_pidfile}" + rm -f "${spl_pidfile}" # There's no point in saving all the data if we're running off a livecd. if [[ -n "${CDBOOT}" ]]; then