]> git.pld-linux.org Git - packages/glibc.git/commitdiff
- rc script.
authorkloczek <kloczek@pld-linux.org>
Sat, 27 Feb 1999 02:17:21 +0000 (02:17 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    nscd.init -> 1.1
    utmpd.init -> 1.1

nscd.init [new file with mode: 0644]
utmpd.init [new file with mode: 0644]

diff --git a/nscd.init b/nscd.init
new file mode 100644 (file)
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 (file)
index 0000000..2457cb9
--- /dev/null
@@ -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
This page took 0.056178 seconds and 4 git commands to generate.