X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=src%2Finitscripts%2Finit.d%2Ffunctions;h=00cd6fa2a1a6d239cb751e36facaea7ad550a13c;hb=16b1a974817033b44db52404f850f447d43f884a;hp=e42bde346e2e24b224d1069039257a5cd0909ec2;hpb=4601019b6ef72b884b8c4e1c4a834d130816db25;p=people%2Fpmueller%2Fipfire-2.x.git diff --git a/src/initscripts/init.d/functions b/src/initscripts/init.d/functions index e42bde346e..00cd6fa2a1 100644 --- a/src/initscripts/init.d/functions +++ b/src/initscripts/init.d/functions @@ -22,7 +22,7 @@ export PATH="/bin:/usr/bin:/sbin:/usr/sbin" RELOADSIG="HUP" # Number of seconds between STOPSIG and FALLBACK when stopping processes -KILLDELAY="3" +KILLDELAY="10" ## Screen Dimensions # Find current screen size @@ -155,12 +155,9 @@ print_error_msg() boot_mesg -n " ipfire, please be so kind to inform us at" boot_mesg " info@ipfire.org.\n" boot_mesg_flush - boot_mesg -n "Press Enter to continue or wait 3 minutes..." ${INFO} + boot_mesg -n "Press Enter to continue or wait a minute..." ${INFO} boot_mesg "" ${NORMAL} - while sleep 180; do - read ENTER - break - done + read -t 60 ENTER } check_script_status() @@ -441,7 +438,7 @@ loadproc() { local pidfile="" local forcestart="" - local nicelevel="10" + local nicelevel="" # This will ensure compatibility with previous LFS Bootscripts if [ -n "${PIDFILE}" ]; then @@ -503,7 +500,13 @@ loadproc() esac fi - nice -n "${nicelevel}" "${@}" + local cmd="${@}" + + if [ -n "${nicelevel}" ]; then + cmd="nice -n "${nicelevel}" ${cmd}" + fi + + ${cmd} evaluate_retval # This is "Probably" not LSB compliant, but required to be compatible with older bootscripts return 0 } @@ -682,15 +685,21 @@ log_warning_msg() { return 0 } -animate() -{ - if [ $# = 0 ] - then - echo "Usage: animate {hook}" - exit 1 - fi - - splash "$*" +run_subdir() { + DIR=$1 + for i in $(ls -v ${DIR}* 2> /dev/null); do + check_script_status + OUT=$(echo $(basename ${i}) | awk -F- '{ print $2 }') + case "$OUT" in + S) ${i} start ;; + K) ${i} stop ;; + RS) ${i} restart ;; + RL) ${i} reload ;; + U) ${i} up ;; + D) ${i} down ;; + *) ${i} ;; + esac + done } # End $rc_base/init.d/functions