File: hotplug.init

package info (click to toggle)
hotplug 0.0.20020114-7
  • links: PTS
  • area: main
  • in suites: woody
  • size: 392 kB
  • ctags: 51
  • sloc: sh: 937; ansic: 257; makefile: 147
file content (59 lines) | stat: -rw-r--r-- 1,230 bytes parent folder | download
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/sh
#
# chkconfig:	2345 01 99
# description:	Starts and stops each hotpluggable subsystem.
#		On startup, may simulate hotplug events for devices
#		that were present at boot time, before filesystems
#		used by /sbin/hotplug became available.
#
# $Id: hotplug.init,v 1.3 2002/01/17 12:39:01 ukai Exp $
#

case "$1" in
start)
    echo -n "Starting hotplug subsystem:"
    for RC in /etc/hotplug/*.rc
    do
        basename=${RC#/etc/hotplug/}
        name=${basename%.rc}
	echo -n " $name"
	$RC $1
    done
    echo "."
    # touch /var/lock/subsys/hotplug
    ;;
stop)
    echo -n "Stopping hotplug subsystem:"
    for RC in /etc/hotplug/*.rc
    do
        basename=${RC#/etc/hotplug/}
        name=${basename%.rc}
	echo -n " $name"
       $RC stop
    done
    echo "."
    # rm -f /var/lock/subsys/hotplug
    ;;
force-reload|restart)
    echo -n "Restarting hotplug subsystem:"
    for RC in /etc/hotplug/*.rc
    do
        basename=${RC#/etc/hotplug/}
        name=${basename%.rc}
	echo -n " $name"
	$RC restart
    done
    echo "."
    ;;
status)
    for RC in /etc/hotplug/*.rc
    do
	$RC $1
    done
    ;;
help|*)
    echo "Usage: $0 [help|start|stop|restart|status|force-reload]"
    exit 1
    ;;
esac
exit 0