Subversion Repositories configs

Rev

Rev 4 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
4 - 1
#!/bin/bash
2
#
3
# wpa_supplicant
4
#
5
# chkconfig:   - 23 88
6
# description: wpa_supplicant is a WPA Supplicant for Linux, BSD and \
7
#     Windows with support for WPA and WPA2 (IEEE 802.11i / RSN). Supplicant \
8
#     is the IEEE 802.1X/WPA component that is used in the client stations. \
9
#     It implements key negotiation with a WPA Authenticator and it controls \
10
#     the roaming and IEEE 802.11 authentication/association of the wlan driver.
11
# processname: wpa_supplicant
12
# config:      /etc/wpa_supplicant/wpa_supplicant.conf
13
#
14
### BEGIN INIT INFO
15
# Provides: wpa_supplicant
16
# Required-Start: $local_fs messagebus
17
# Required-Stop: $local_fs messagebus
18
# Default-Start:
19
# Default-Stop: 0 1 6
20
# Short-Description: start and stop wpa_supplicant
21
# Description: wpa_supplicant is a tool for connecting to wireless networks
22
### END INIT INFO
23
 
24
# Source function library.
25
. /etc/rc.d/init.d/functions
26
 
27
# Source networking configuration.
28
. /etc/sysconfig/network
29
 
30
exec="/usr/sbin/wpa_supplicant"
31
prog=$(basename $exec)
32
conf="/etc/wpa_supplicant/wpa_supplicant.conf"
33
lockfile=/var/lock/subsys/$prog
34
 
35
[ -e /etc/sysconfig/$prog ] && . /etc/sysconfig/$prog
36
 
37
start() {
38
 	echo -n $"Starting $prog: $conf, $INTERFACES, $DRIVERS"
39
	daemon $prog -c $conf $INTERFACES $DRIVERS -B $OTHER_ARGS
40
	retval=$?
41
	echo
42
	[ $retval -eq 0 ] && touch $lockfile
43
	return $retval
44
}
45
 
46
stop() {
47
	echo -n $"Stopping $prog: "
48
	killproc $prog
49
	retval=$?
50
	echo
51
	[ $retval -eq 0 ] && rm -f $lockfile
52
	return $retval
53
}
54
 
55
restart() {
56
	stop
57
	start
58
}
59
 
60
reload() {
58 - 61
	echo -n $"Reloading $prog: "
62
	killproc $prog -HUP
63
	echo
4 - 64
}
65
 
66
force_reload() {
67
	restart
68
}
69
 
70
fdr_status() {
71
	status $prog
72
}
73
 
74
 
75
case "$1" in
76
	start|stop|restart|reload)
77
  		$1
78
		;;
79
	force-reload)
80
		force_reload
81
		;;
82
	status)
83
		fdr_status
84
		;;
85
	condrestart|try-restart)
86
		[ -f $lockfile ] && restart
87
		;;
88
	*)
89
		echo $"Usage: $0 {start|stop|status|restart|try-restart|reload|force-reload}"
90
		exit 1
91
esac
92