Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37859370
en ru br
ALT Linux repos
S:2.10-alt2
5.0: 0.6.5-alt1
4.1: 0.5.10-alt3.M41.1
4.0: 0.5.8-alt1
3.0: 0.3.9-alt2

Group :: Security/Networking
RPM: wpa_supplicant

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

#!/bin/sh
#
# chkconfig: 2345 11 89
# description: wpa_supplicant is an implementation of the WPA Supplicant \
# component, i.e., the part that runs in the client stations. \
# It implements WPA key negotiation with a WPA Authenticator \
# and EAP authentication with Authentication Server. In \
# addition, it controls the roaming and IEEE 802.11 \
# authentication/association of the wlan driver.
# config: /etc/wpa_supplicant.conf
# pidfile: /var/run/wpa_supplicant.pid

# author: Alexei Takaseev <taf@altlinux.ru>
# version: 2004100700
# changed: 2004100700 initialize release

# Source function library

WITHOUT_RC_COMPAT=1

. /etc/init.d/functions

# Source networking configuration.
SourceIfNotEmpty /etc/sysconfig/network

# check if the config files are present
[ -f /etc/wpa_supplicant.conf ] || exit 0

# Source service configuration.
if [ -f /etc/sysconfig/wpa_supplicant ]; then
. /etc/sysconfig/wpa_supplicant
else
echo "${0##*/}: configfile /etc/sysconfig/wpa_supplicant does NOT exist !"
exit 1
fi

PIDFILE=/var/run/wpa_supplicant.pid
LOCKFILE=/var/lock/subsys/wpa_supplicant
RETVAL=0

start() {
is_yes "$NETWORKING" || return 0
start_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user root -- wpa_supplicant $WPA_SUPPLICANT_OPTIONS
RETVAL=$?
return $RETVAL
}

stop() {
stop_daemon --pidfile "$PIDFILE" --lockfile "$LOCKFILE" --expect-user root wpa_supplicant
RETVAL=$?
return $RETVAL
}

restart() {
stop
start
}

reload() {
msg_reloading wpa_supplicant
stop_daemon --expect-user root -HUP wpa_supplicant
RETVAL=$?
return $RETVAL
}

case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
reload)
reload
;;
condrestart)
if [ -e /var/lock/subsys/wpa_supplicant ]; then
restart
fi
;;
condreload)
if [ -e /var/lock/subsys/wpa_supplicant ]; then
reload
fi
;;
condstop)
if [ -e /var/lock/subsys/wpa_supplicant ]; then
stop
fi
;;
status)
status --pidfile "$PIDFILE" --expect-user root wpa_supplicant
RETVAL=$?
;;
*)
echo $"Usage: wpa_supplicant {start|stop|restart|reload|condrestart|condreload|condstop|status}"
RETVAL=1
esac

exit $RETVAL
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin