From da30105859f097b43325a49c9331faeb568539b4 Mon Sep 17 00:00:00 2001 From: kloczek Date: Sat, 27 Feb 1999 02:17:21 +0000 Subject: [PATCH] - rc script. Changed files: nscd.init -> 1.1 utmpd.init -> 1.1 --- nscd.init | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ utmpd.init | 48 ++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 104 insertions(+) create mode 100644 nscd.init create mode 100644 utmpd.init diff --git a/nscd.init b/nscd.init new file mode 100644 index 0000000..3905f7f --- /dev/null +++ b/nscd.init @@ -0,0 +1,56 @@ +#!/bin/bash +# +# nscd: Starts the Name Switch Cache Daemon +# +# chkconfig: - 30 80 +# description: This is a daemon which handles passwd and group lookups \ +# for running programs and cache the results for the next \ +# query. You should start this daemon only if you use \ +# slow Services like NIS or NIS+ +# processname: nscd +# config: /etc/nscd.conf +# + +# Sanity checks. +[ -f /etc/nscd.conf ] || exit 0 +[ -x /usr/sbin/nscd ] || exit 0 + +# Source function library. +. /etc/rc.d/init.d/functions + +# See how we were called. +case "$1" in + start) + secure="" +# for table in passwd group +# do +# if egrep '^'$table':.*nisplus' /etc/nsswitch.conf >/dev/null +# then +# /usr/lib/nscd_nischeck $table || +# secure="$secure -S $table,yes" +# fi +# done + show Starting Name Switch Cache Daemon + daemon nscd $secure + touch /var/lock/subsys/nscd + ;; + stop) + show Stopping Name Switch Cache Daemon + busy + /usr/sbin/nscd -K + rm -f /var/lock/subsys/nscd + deltext + ok + ;; + status) + status nscd + ;; + restart|reload) + $0 stop + $0 start + ;; + *) + echo "Usage: $0 {start|stop|status|restart|reload}" + ;; +esac +exit 0 diff --git a/utmpd.init b/utmpd.init new file mode 100644 index 0000000..2457cb9 --- /dev/null +++ b/utmpd.init @@ -0,0 +1,48 @@ +#!/bin/bash +# +# /etc/rc.d/init.d/utmpd +# +# Starts the utmpd daemon +# +# chkconfig: 345 25 55 +# description: Utmpd daemon +# processname: utmpd +# +export PATH=/bin:/usr/bin:/sbin:/usr/sbin + +# Source function library. +. /etc/rc.d/init.d/functions + +# See how we were called. +# +case "$1" in + start) + show Starting utmpd daemon + # Clean up /var/run and create /var/run/utmp so that we can login. + #( cd /var/run && find . ! -type d -exec rm -f -- {} \; ) + : > /var/run/utmpx + : > /var/run/utmp + if [ ! -f /var/log/wtmpx ]; then + : > /var/log/wtmpx + fi + daemon utmpd + touch /var/lock/subsys/utmpd + ;; + stop) + show Stopping utmpd daemon + killproc utmpd + rm -f /var/lock/subsys/utmpd + ;; + reload|restart) + $0 stop + $0 start + ;; + status) + status utmpd + ;; + *) + echo "Usage: $0 {start|stop|restart|reload|status}" + exit 1 +esac + +exit 0 -- 2.44.0