Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37844365
en ru br
ALT Linux repos
S:2.10-alt2
5.0: 0.6.5-alt1
4.1: 0.6.3-alt1
4.0: 0.4.9-alt2.1
3.0: 0.3.9-alt2

Other repositories
Upstream:0.6.3

Group :: System/Kernel and hardware
RPM: hostapd

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

#!/bin/sh
#
# chkconfig: 2345 11 89
# description: The daemon supports a so called Host AP mode, i.e., \
# it takes care of IEEE 802.11 management functions in \
# the host computer and acts as an access point.
# config: /etc/hostapd/hostapd.conf
# config: /etc/hostapd/hostapd.accept
# config: /etc/hostapd/hostapd.deny
# pidfile: /var/run/hostapd.pid

# author: Alexei Takaseev <taf@altlinux.ru>
# version: 2004100700
# changed: 2004100700 cleanup script
# changed: 2003093000 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/hostapd/hostapd.conf ] || exit 0
[ -f /etc/hostapd/hostapd.accept ] || exit 0
[ -f /etc/hostapd/hostapd.deny ] || exit 0

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

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

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

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

restart() {
stop
start
}

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

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