summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/service_harddrake.sh
blob: 147929b6a2dc68f3ea7dca8877f0e77a0e7c74be (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#!/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.
#
# X-Parallel-Init
# X-Parallel-Requires: pcmcia
# X-Parallel-Interactive

# 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) do not support updfstab (yet)
#	action "Updating /etc/fstab" /usr/sbin/updfstab

	gprintf "Checking for new hardware"
 	/usr/share/harddrake/service_harddrake 2>/dev/null
	RETVAL=$?
	if [ "$RETVAL" -eq 0 ]; then
  	   action "" /bin/true
	else
	   action "" /bin/false
	fi
	# We do not 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 run at boot time"
	   else gprintf "Harddrake service was not run at boot time"
	   fi
        echo
	;;
 reload)
        ;;
 stop)
	# dummy
 	rm -f $SUBSYS
 	action "Stopping %s" harddrake /usr/share/harddrake/service_harddrake stop 2>/dev/null
 	;;
 *)
 	gprintf "Usage: %s {start|stop}\n" "$0"
	exit 1
	;;
esac