96 lines
2.1 KiB
Bash
96 lines
2.1 KiB
Bash
#! /bin/sh
|
|
# Copyright (c) 1995-2004 SuSE Linux AG, Nuernberg, Germany.
|
|
# All rights reserved.
|
|
#
|
|
# Author: Lars Mueller <lmuelle@suse.de>
|
|
# Please send feedback to http://www.suse.de/feedback/
|
|
#
|
|
# /etc/init.d/oidentd
|
|
# and its symbolic link
|
|
# /usr/sbin/rcoidentd
|
|
#
|
|
### BEGIN INIT INFO
|
|
# Provides: oidentd
|
|
# Required-Start: $syslog $remote_fs
|
|
# Required-Stop: $syslog $remote_fs
|
|
# Default-Start: 3 5
|
|
# Default-Stop: 0 1 2 6
|
|
# Short-Description: Configurable IDENT server that supports NAT/IP masq
|
|
# Description: Oidentd is an ident (rfc1413 compliant) daemon. Oidentd
|
|
# has a flexible mechanism for specifying ident responses. Users can be
|
|
# granted permission to specify their own ident responses. Responses can be
|
|
# specified according to host and port pairs.
|
|
### END INIT INFO
|
|
|
|
. /etc/rc.status
|
|
rc_reset
|
|
|
|
SYSCONFIG_FILE="/etc/sysconfig/oidentd"
|
|
OIDENTD_BIN="/usr/sbin/oidentd"
|
|
|
|
if [ ! -f ${SYSCONFIG_FILE} ]; then
|
|
echo -n "Oidentd configuration file ${SYSCONFIG_FILE} does not exist. "
|
|
# Tell the user this has skipped
|
|
rc_status -s
|
|
exit 6
|
|
fi
|
|
. ${SYSCONFIG_FILE}
|
|
|
|
if [ ! -x ${OIDENTD_BIN} ]; then
|
|
echo -n "Oidentd, ${OIDENTD_BIN} not installed! "
|
|
# Tell the user this has skipped
|
|
rc_status -s
|
|
exit 5
|
|
fi
|
|
|
|
test x"${OIDENTD_MASQ}" == x"yes" && OIDENTD_OPTIONS="${OIDENTD_OPTIONS} --masq"
|
|
|
|
case "$1" in
|
|
start)
|
|
echo -n "Starting oidentd "
|
|
startproc ${OIDENTD_BIN} ${OIDENTD_OPTIONS}
|
|
|
|
rc_status -v
|
|
;;
|
|
stop)
|
|
echo -n "Shutting down oidentd "
|
|
killproc -TERM ${OIDENTD_BIN}
|
|
|
|
rc_status -v
|
|
;;
|
|
try-restart|condrestart)
|
|
if test "$1" = "condrestart"; then
|
|
echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart ${warn}(RH)${norm}"
|
|
fi
|
|
$0 status
|
|
if test $? = 0; then
|
|
$0 restart
|
|
else
|
|
rc_reset # Not running is not a failure.
|
|
fi
|
|
rc_status
|
|
;;
|
|
restart)
|
|
$0 stop
|
|
$0 start
|
|
|
|
rc_status
|
|
;;
|
|
force-reload|reload)
|
|
echo -n "Reload service oidentd "
|
|
killproc -HUP ${OIDENTD_BIN}
|
|
|
|
rc_status -v
|
|
;;
|
|
status)
|
|
echo -n "Checking for service oidentd "
|
|
checkproc ${OIDENTD_BIN}
|
|
rc_status -v
|
|
;;
|
|
*)
|
|
echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload}"
|
|
exit 1
|
|
;;
|
|
esac
|
|
rc_exit
|