ALT Linux repositórios
S: | 9.16.44-alt1 |
5.0: | 9.3.6-alt5 |
4.1: | 9.3.6-alt4.M41.2 |
+updates: | 9.3.6-alt4.M41.1 |
4.0: | 9.3.6-alt4.M41.1 |
+updates: | 9.3.6-alt4.M41.1 |
3.0: | 9.2.4.rel-alt2 |
Group :: Sistema/Servidores
RPM: bind
Main Changelog Spec Patches Sources Download Gear Bugs e FR Repocop
#!/bin/sh
#
# lwresd This shell script takes care of starting and stopping
# lwresd (Lightweight Resolver Daemon).
#
# chkconfig: 345 21 54
# description: \
# lwresd is the daemon providing name lookup services to \
# clients that use the BIND 9 lightweight resolver library.
# processname: lwresd
WITHOUT_RC_COMPAT=1
# Source function library.
. /etc/init.d/functions
# Source networking configuration.
SourceIfNotEmpty /etc/sysconfig/network
LWRESD_ROOT="/var/resolv"
LOCKFILE=/var/lock/subsys/lwresd
RETVAL=0
adjust()
{
action "Adjusting environment for lwresd:" /etc/chroot.d/resolv.conf
RETVAL=$?
return $RETVAL
}
start()
{
is_yes "$NETWORKING" || return 0
adjust || return
start_daemon --lockfile "$LOCKFILE" --expect-user lwresd -- lwresd -u lwresd -t "$LWRESD_ROOT"
RETVAL=$?
return $RETVAL
}
stop()
{
stop_daemon --lockfile "$LOCKFILE" --expect-user lwresd -- lwresd
RETVAL=$?
return $RETVAL
}
restart()
{
stop
start
}
# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
restart
;;
status)
status lwresd
RETVAL=$?
;;
adjust)
adjust
;;
condstop)
if [ -e "$LOCKFILE" ]; then
stop
fi
;;
condrestart)
if [ -e "$LOCKFILE" ]; then
restart
fi
;;
condreload)
if [ -e "$LOCKFILE" ]; then
reload
fi
;;
*)
msg_usage "${0##*/} {start|stop|restart|reload|status|adjust|condstop|condrestart}"
RETVAL=1
esac
exit $RETVAL