On Wed, May 09, 2007 at 08:38:38PM +0200, Petter Reinholdtsen wrote:
[David Härdeman]
the attached patch changes the sysvinit init.d script(s) to allow splash scripts to hook into the fsck stage so that special action can be taken (in the case of usplash, this would be to set a high timeout and to let the progressbar reflect that an unknown amount of time will be spent fscking, splashy would probably want something similar).

This seem like a good idea to me, and I suspect we should move all the
current usplash hooks into the /lib/init/splash-functions-base file if
we go this way, to make it easier for splasy and others to hook into
the boot system.

Here's a more complete stub (/lib/init/splash-functions-base) file which should allow many more scripts to use the generic functions.

--
David Härdeman

# Detects whether a splash is running
splash_running() { return 1; }

# Tells the splash to quit
splash_quit () { return 0; }

# Tells the splash the current boot progress in percent (as $1)
splash_progress () { return 0; }

# Tells the splash that a fsck has started
splash_start_fsck () { return 0; }

# Tells the splash that a fsck is done
splash_stop_fsck () { return 0; }

# Gets user input from a splash
# Returns 1 if no user input is possible
# Should be called with an alternative non-splash input fallback:
#   INPUT="$(splash_user_input)" || INPUT="$(manual_method)"
splash_user_input () { return 1; }

# Allow these to be overridden with custom scripts
[ -e /lib/init/splash-functions ] && . /lib/init/splash-functions

Reply via email to