Subversion Repositories configs

Rev

Go to most recent revision | Details | 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() {
61
	restart
62
}
63
 
64
force_reload() {
65
	restart
66
}
67
 
68
fdr_status() {
69
	status $prog
70
}
71
 
72
 
73
case "$1" in
74
	start|stop|restart|reload)
75
  		$1
76
		;;
77
	force-reload)
78
		force_reload
79
		;;
80
	status)
81
		fdr_status
82
		;;
83
	condrestart|try-restart)
84
		[ -f $lockfile ] && restart
85
		;;
86
	*)
87
		echo $"Usage: $0 {start|stop|status|restart|try-restart|reload|force-reload}"
88
		exit 1
89
esac
90