diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2002-07-09 13:23:49 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2002-07-09 13:23:49 +0000 |
commit | 15052c100e148a94553ee155d7384b67e6537675 (patch) | |
tree | 118d6e5702d061645cd0c25c9bedca6740e3a551 /perl-install/standalone | |
parent | a6a904a31e39b74144c53f0cc4086d496b70c09a (diff) | |
download | drakx-backup-do-not-use-15052c100e148a94553ee155d7384b67e6537675.tar drakx-backup-do-not-use-15052c100e148a94553ee155d7384b67e6537675.tar.gz drakx-backup-do-not-use-15052c100e148a94553ee155d7384b67e6537675.tar.bz2 drakx-backup-do-not-use-15052c100e148a94553ee155d7384b67e6537675.tar.xz drakx-backup-do-not-use-15052c100e148a94553ee155d7384b67e6537675.zip |
fix boot freeze on hw change: initscript was running us with stdout
redirected to /dev/null; just use a small sh wrapper to fix it
Diffstat (limited to 'perl-install/standalone')
-rwxr-xr-x | perl-install/standalone/service_harddrake | 14 | ||||
-rw-r--r-- | perl-install/standalone/service_harddrake.sh | 57 |
2 files changed, 58 insertions, 13 deletions
diff --git a/perl-install/standalone/service_harddrake b/perl-install/standalone/service_harddrake index 56fbfdbb5..09f86ad7c 100755 --- a/perl-install/standalone/service_harddrake +++ b/perl-install/standalone/service_harddrake @@ -1,23 +1,11 @@ #!/usr/bin/perl -w # harddrake2 This service runs the HardDrake hardware probe. -# -# chkconfig: 345 05 95 -# description: This runs the hardware probe, and optionally configures \ -# changed hardware. - - -# TODO: start/stop/status/ use lib qw(/usr/lib/libDrakX); -use strict; +#use strict; use standalone; #- warning, standalone must be loaded very first, for 'explanations' -if ($ARGV[0] !~ /^start$/) { - print "service harddrake [start|stop]\n"; - exit 0; -} - use MDK::Common; use POSIX; diff --git a/perl-install/standalone/service_harddrake.sh b/perl-install/standalone/service_harddrake.sh new file mode 100644 index 000000000..1f5541954 --- /dev/null +++ b/perl-install/standalone/service_harddrake.sh @@ -0,0 +1,57 @@ +#!/bin/bash +# +# harddrake This scripts runs the harddrake hardware probe. +# +# chkconfig: 345 05 95 +# description: This runs the hardware probe, and optionally configures \ +# changed hardware. + +# This is an interactive program, we need the current locale + +[[ -f /etc/profile.d/lang.sh ]] && . /etc/profile.d/lang.sh + +# Source function library. +. /etc/rc.d/init.d/functions + + +SUBSYS=/var/lock/subsys/harddrake + +case "$1" in + start) +# We (mdk) don't support updfstab (yet) +# action "Updating /etc/fstab" /usr/sbin/updfstab + + gprintf "Checking for new hardware" + rm -f /var/run/Xconfig + rm -f /var/run/Xconfig-failed + + # Have a 30 second timeout. + /usr/share/harddrake/service_harddrake + RETVAL=$? + if [ "$RETVAL" -eq 0 ]; then + action "" /bin/true + else + action "" /bin/false + fi + # We don't want to run this on random runlevel changes. + touch $SUBSYS +# [ /etc/modules.conf -nt /lib/modules/$(uname -r)/modules.dep ] && touch /lib/modules/$(uname -r)/modules.dep 2>/dev/null >/dev/null || : & + exit $RETVAL + ;; + status) + if [ -f $SUBSYS ]; then + gprintf "Harddrake service was runned at boot time" + else gprintf "Harddrake service was not runned at boot time" + fi + ;; + reload) + ;; + stop) + # dummy + rm -f $SUBSYS + ;; + *) + gprintf "Usage: %s {start|stop}\n" "$0" + exit 1 + ;; +esac |