r7583 - in trunk/bootscripts: . contrib contrib/lsb-v3 contrib/lsb-v3/blfs contrib/lsb-v3/blfs/init.d contrib/lsb-v3/sysconfig contrib/lsb-v3/sysconfig/network-devices contrib/lsb-v3/sysconfig/network-devices/services

dj at linuxfromscratch.org dj at linuxfromscratch.org
Sun Sep 7 09:57:38 PDT 2008


Author: dj
Date: 2008-09-07 10:57:38 -0600 (Sun, 07 Sep 2008)
New Revision: 7583

Added:
   trunk/bootscripts/contrib/
   trunk/bootscripts/contrib/lsb-v3/
   trunk/bootscripts/contrib/lsb-v3/Changelog
   trunk/bootscripts/contrib/lsb-v3/Makefile
   trunk/bootscripts/contrib/lsb-v3/README
   trunk/bootscripts/contrib/lsb-v3/blfs/
   trunk/bootscripts/contrib/lsb-v3/blfs/init.d/
   trunk/bootscripts/contrib/lsb-v3/blfs/init.d/alsa
   trunk/bootscripts/contrib/lsb-v3/blfs/init.d/cups
   trunk/bootscripts/contrib/lsb-v3/blfs/init.d/cyrus-sasl
   trunk/bootscripts/contrib/lsb-v3/blfs/init.d/dbus
   trunk/bootscripts/contrib/lsb-v3/blfs/init.d/gdm
   trunk/bootscripts/contrib/lsb-v3/blfs/init.d/gpm
   trunk/bootscripts/contrib/lsb-v3/blfs/init.d/haldaemon
   trunk/bootscripts/contrib/lsb-v3/blfs/init.d/httpd
   trunk/bootscripts/contrib/lsb-v3/blfs/init.d/named
   trunk/bootscripts/contrib/lsb-v3/blfs/init.d/nas
   trunk/bootscripts/contrib/lsb-v3/blfs/init.d/ntpd
   trunk/bootscripts/contrib/lsb-v3/blfs/init.d/openldap1
   trunk/bootscripts/contrib/lsb-v3/blfs/init.d/postfix
   trunk/bootscripts/contrib/lsb-v3/blfs/init.d/samba
   trunk/bootscripts/contrib/lsb-v3/blfs/init.d/sshd
   trunk/bootscripts/contrib/lsb-v3/sysconfig/
   trunk/bootscripts/contrib/lsb-v3/sysconfig/network-devices/
   trunk/bootscripts/contrib/lsb-v3/sysconfig/network-devices/services/
   trunk/bootscripts/contrib/lsb-v3/sysconfig/network-devices/services/dhcpcd
Log:
Initial commit of lsb-v3 scripts for BLFS.

Added: trunk/bootscripts/contrib/lsb-v3/Changelog
===================================================================
--- trunk/bootscripts/contrib/lsb-v3/Changelog	                        (rev 0)
+++ trunk/bootscripts/contrib/lsb-v3/Changelog	2008-09-07 16:57:38 UTC (rev 7583)
@@ -0,0 +1 @@
+20080907  * [dj] - Initial commit (partial). 

Added: trunk/bootscripts/contrib/lsb-v3/Makefile
===================================================================
--- trunk/bootscripts/contrib/lsb-v3/Makefile	                        (rev 0)
+++ trunk/bootscripts/contrib/lsb-v3/Makefile	2008-09-07 16:57:38 UTC (rev 7583)
@@ -0,0 +1,110 @@
+ETCDIR=/etc
+EXTDIR=${DESTDIR}${ETCDIR}
+MODE=754
+DIRMODE=755
+CONFMODE=644
+
+# The grep can probably be improved upon.
+all:
+	@grep "^install" Makefile | cut -d ":" -f 1
+	@echo "Select an appropriate install target from the above list" ; exit 1
+
+create-dirs:
+	install -d -m ${DIRMODE} ${EXTDIR}/rc{0,1,2,3,4,5,6,S}.d
+	install -d -m ${DIRMODE} ${EXTDIR}/init.d
+	install -d -m ${DIRMODE} ${EXTDIR}/sysconfig
+
+create-service-dir:
+	install -d -m ${DIRMODE} ${EXTDIR}/sysconfig/network-devices/services
+
+install-service-dhcpcd: create-service-dir
+	install -m ${MODE} blfs/sysconfig/network-devices/services/dhcpcd   ${EXTDIR}/sysconfig/network-devices/services
+
+install-alsa: create-dirs
+	install -m ${MODE} blfs/init.d/alsa       ${EXTDIR}/init.d/
+	/usr/lib/lsb/install_initd ${EXTDIR}/init.d/alsa
+
+install-named: create-dirs
+	install -m ${MODE} blfs/init.d/named       ${EXTDIR}/init.d/
+	/usr/lib/lsb/install_initd ${EXTDIR}/init.d/named
+
+install-cups: create-dirs
+	install -m ${MODE} blfs/init.d/cups       ${EXTDIR}/init.d/
+	rm -f ${EXTDIR}/rc0.d/K36cups
+	rm -f ${EXTDIR}/rc2.d/K36cups
+	rm -f ${EXTDIR}/rc3.d/K36cups
+	rm -f ${EXTDIR}/rc5.d/K36cups
+	rm -f ${EXTDIR}/rc2.d/S81cups
+	rm -f ${EXTDIR}/rc3.d/S81cups
+	rm -f ${EXTDIR}/rc5.d/S81cups
+	/usr/lib/lsb/install_initd ${EXTDIR}/init.d/cups
+
+install-cyrus-sasl: create-dirs
+	install -m ${MODE} blfs/init.d/cyrus-sasl ${EXTDIR}/init.d/
+	/usr/lib/lsb/install_initd ${EXTDIR}/init.d/cyrus-sasl
+
+install-dbus: create-dirs
+	install -m ${MODE} blfs/init.d/dbus ${EXTDIR}/init.d/
+	/usr/lib/lsb/install_initd ${EXTDIR}/init.d/dbus
+
+install-gdm: create-dirs
+	install -m ${MODE} blfs/init.d/gdm        ${EXTDIR}/init.d/
+	/usr/lib/lsb/install_initd ${EXTDIR}/init.d/gdm
+
+install-gpm: create-dirs
+	install -m ${MODE} blfs/init.d/gpm        ${EXTDIR}/init.d/
+	/usr/lib/lsb/install_initd ${EXTDIR}/init.d/gpm
+
+install-haldaemon: create-dirs
+	install -m ${MODE} blfs/init.d/haldaemon      ${EXTDIR}/init.d/
+	/usr/lib/lsb/install_initd ${EXTDIR}/init.d/haldaemon
+
+install-httpd: create-dirs
+	install -m ${MODE} blfs/init.d/httpd     ${EXTDIR}/init.d/
+	/usr/lib/lsb/install_initd ${EXTDIR}/init.d/httpd
+
+install-named: create-dirs
+	install -m ${MODE} blfs/init.d/named       ${EXTDIR}/init.d/
+	/usr/lib/install_initd ${EXTDIR}/init.d/named
+
+install-nas: create-dirs
+	install -m ${MODE} blfs/init.d/nas        ${EXTDIR}/init.d/
+	/usr/lib/lsb/install_initd ${EXTDIR}/init.d/nas
+
+install-ntpd: create-dirs
+	install -m ${MODE} blfs/init.d/ntpd       ${EXTDIR}/init.d/
+	/usr/lib/lsb/install_initd ${EXTDIR}/init.d/ntpd
+
+install-openldap1: create-dirs
+	install -m ${MODE} blfs/init.d/openldap1  ${EXTDIR}/init.d/openldap
+	/usr/lib/lsb/install_initd ${EXTDIR}/init.d/openldap
+
+install-postfix: create-dirs
+	install -m ${MODE} blfs/init.d/postfix    ${EXTDIR}/init.d/
+	/usr/lib/lsb/install_initd ${EXTDIR}/init.d/postfix
+
+install-samba: create-dirs
+	install -m ${MODE} blfs/init.d/samba      ${EXTDIR}/init.d/
+	/usr/lib/lsb/install_initd ${EXTDIR}/init.d/samba
+
+install-sshd: create-dirs
+	install -m ${MODE} blfs/init.d/sshd       ${EXTDIR}/init.d/
+	/usr/lib/lsb/install_initd ${EXTDIR}/init.d/sshd
+
+
+.PHONY: all create-dirs create-service-dir \
+	install-service-dhclient \
+	install-service-dhcpcd \
+	install-alsa \
+	install-cups \
+	install-cyrus-sasl \
+	install-gdm \
+	install-gpm \
+	install-httpd \
+	install-named \
+	install-nas \
+	install-ntpd \
+	install-openldap1 \
+	install-postfix \
+	install-samba \
+	install-sshd 

Added: trunk/bootscripts/contrib/lsb-v3/README
===================================================================
--- trunk/bootscripts/contrib/lsb-v3/README	                        (rev 0)
+++ trunk/bootscripts/contrib/lsb-v3/README	2008-09-07 16:57:38 UTC (rev 7583)
@@ -0,0 +1,14 @@
+Thes scripts require the lsb-v3 scripts included in lfs-bootscripts from
+current LFS SVN.  See the README file there for more information.
+
+Currently, only about half of the BLFS scripts are included here and
+dependency information is not guaranteed to be accurate on the initial
+commit.  The operation of the scripts, however, should be good.  If you have
+the time, please do send corrections, changes, additions, patches, etc.
+my way.
+
+Thanks.
+
+DJ Lucas
+dj_AT_linuxfromscratch_DOT_org
+

Added: trunk/bootscripts/contrib/lsb-v3/blfs/init.d/alsa
===================================================================
--- trunk/bootscripts/contrib/lsb-v3/blfs/init.d/alsa	                        (rev 0)
+++ trunk/bootscripts/contrib/lsb-v3/blfs/init.d/alsa	2008-09-07 16:57:38 UTC (rev 7583)
@@ -0,0 +1,38 @@
+#!/bin/sh
+# Begin $rc_base/init.d/alsa
+
+### BEGIN INIT INFO
+# Provides:            alsa
+# Required-Start:      
+# Should-Start:
+# Required-Stop:       $network
+# Should-Stop:         $remote_fs
+# Default-Start:
+# Default-Stop:        0 6
+# Short-Description:   Saves the current volume of all sound channels.
+# Description:         Saves the current volume of all sound channels on
+#                      shutdown so that they can be restored on next boot.
+# X-LFS-Default-Start:
+# X-LFS-Default-Stop:  K35
+# X-LFS-Provided-By:   BLFS
+### END INIT INFO
+
+
+. /lib/lsb/init-functions
+
+MESSAGE="Stopping ALSA...    Saving volumes..."
+
+case "$1" in
+
+        stop)
+                /usr/sbin/alsactl store
+                evaluate_retval generic
+                ;;
+
+        *)
+                echo "Usage: $0 stop"
+                exit 1
+                ;;
+esac
+
+# End $rc_base/init.d/alsa

Added: trunk/bootscripts/contrib/lsb-v3/blfs/init.d/cups
===================================================================
--- trunk/bootscripts/contrib/lsb-v3/blfs/init.d/cups	                        (rev 0)
+++ trunk/bootscripts/contrib/lsb-v3/blfs/init.d/cups	2008-09-07 16:57:38 UTC (rev 7583)
@@ -0,0 +1,60 @@
+#!/bin/sh
+# Begin /etc/init.d/cups
+
+### BEGIN INIT INFO
+# Provides:            cups
+# Required-Start:      $network
+# Should-Start:        $remote_fs
+# Required-Stop:       $network
+# Should-Stop:         $remote_fs
+# Default-Start:       3 4 5 
+# Default-Stop:        0 1 2 6
+# Short-Description:   Starts/Stops the Common UNIX Printing System.
+# Description:         Starts and stops the Common UNIX Printing System's
+#                      cupsd daemon.
+# X-LFS-Provided-By:   BLFS
+### END INIT INFO
+
+. /lib/lsb/init-functions
+
+BIN_FILE="/usr/sbin/cupsd"
+MESSAGE="Commun UNIX Printing System..."
+
+chk_stat
+
+case $1 in
+    start)
+        start_daemon "${BIN_FILE}"
+                evaluate_retval start
+        ;;
+
+    stop)
+        killproc "${BIN_FILE}"
+                evaluate_retval stop
+        ;;
+
+        # force-reload is no different than reload for applications
+        # that support a regular reload.
+    force-reload | reload)
+        killproc "${BIN_FILE}" -HUP
+        evaluate_retval reload
+        ;;
+
+    restart)
+        killproc "${BIN_FILE}"
+        sleep 1
+        start_daemon "${BIN_FILE}"
+                evaluate_retval restart
+        ;;
+
+    status)
+        statusproc
+        ;;
+
+    *)
+        echo "Usage: $0 {start|stop|force-reload|reload|restart|status}"
+        exit 1
+        ;;
+esac
+
+# End /etc/init.d/cups

Added: trunk/bootscripts/contrib/lsb-v3/blfs/init.d/cyrus-sasl
===================================================================
--- trunk/bootscripts/contrib/lsb-v3/blfs/init.d/cyrus-sasl	                        (rev 0)
+++ trunk/bootscripts/contrib/lsb-v3/blfs/init.d/cyrus-sasl	2008-09-07 16:57:38 UTC (rev 7583)
@@ -0,0 +1,55 @@
+#!/bin/sh
+# Begin /etc/init.d/openldap
+
+### BEGIN INIT INFO
+# Provides:            cyrus-sasl
+# Required-Start:      $network
+# Should-Start:
+# Required-Stop:
+# Should-Stop:         netfs
+# Default-Start:       3 4 5
+# Default-Stop:        0 1 2 6
+# Short-Description:   Controls Cyrus-SASL saslauthd.
+# Description:         Controls Cyrus-SASL saslauthd.
+# X-LFS-Default-Start: S45
+# X-LFS-Default-Stop:  K48
+# X-LFS-Provided-By:   BLFS
+### END INIT INFO
+
+. /lib/lsb/init-functions
+
+MESSAGE="Cyrus SASL auth daemon"
+BIN_FILE="/usr/sbin/saslauthd"
+PIDFILE="/var/run/saslauthd/saslauthd.pid"
+
+case "$1" in
+    start)
+        start_daemon "${BIN_FILE}" -a ldap
+        evaluate_retval start
+    ;;
+
+    stop)
+        # slapd needs SIGINT
+        killproc -p "${PIDFILE}" "${BIN_FILE}"
+	evaluate_retval stop
+    ;;
+
+    restart)
+        killproc -p "${PIDFILE}" "${BIN_FILE}" &&
+        sleep 1 &&
+        start_daemon "${BIN_FILE}"
+	evaluate_retval restart
+    ;;
+
+    status)
+        statusproc "${BIN_FILE}"
+    ;;
+
+    *)
+        echo "Usage: $0 {start|stop|restart|status}"
+        exit 1
+    ;;
+
+esac
+
+# End $rc_base/init.d/openldap

Added: trunk/bootscripts/contrib/lsb-v3/blfs/init.d/dbus
===================================================================
--- trunk/bootscripts/contrib/lsb-v3/blfs/init.d/dbus	                        (rev 0)
+++ trunk/bootscripts/contrib/lsb-v3/blfs/init.d/dbus	2008-09-07 16:57:38 UTC (rev 7583)
@@ -0,0 +1,74 @@
+#!/bin/sh
+# Begin /etc/init.d/dbus
+
+### BEGIN INIT INFO
+# Provides:            dbus
+# Required-Start:      $network
+# Should-Start:        $remote_fs
+# Required-Stop:       $network
+# Should-Stop:         $remote_fs
+# Default-Start:       3 4 5 
+# Default-Stop:        0 1 2 6
+# Short-Description:   Starts/Stops the D-Bus Messagebus daemon.
+# Description:         Starts and stops the D-Bus Messagebus daemon.
+# X-LFS-Provided-By:   BLFS
+### END INIT INFO
+
+. /lib/lsb/init-functions
+
+BIN_FILE="/usr/bin/dbus-daemon"
+MESSAGE="the D-Bus Messagebus Daemon"
+CONFIGFILE="/etc/dbus-1/system.conf"
+PIDFILE="/var/run/dbus/pid"
+SOCKET="/var/run/dbus/system_bus_socket"
+chk_stat
+
+case "$1" in
+
+    start)
+        /usr/bin/dbus-uuidgen --ensure > /dev/null &&
+        start_daemon "${BIN_FILE}" --config-file="${CONFIGFILE}"
+        evaluate_retval start
+    ;;
+
+    stop)
+        killproc -p "${PIDFILE}" "${BIN_FILE}"
+        evaluate_retval stop
+        if [ -e "${SOCKET}" ]; then
+            rm "${SOCKET}" 2> /dev/null
+        fi
+    ;;
+
+    force-reload)
+        # -HUP not supported so just restart it.
+        killproc -p "${PIDFILE}" "${BIN_FILE}"
+        sleep 1
+        if [ -e "${SOCKET}" ]; then
+            rm "${SOCKET}" 2> /dev/null
+        fi
+        start_daemon "${BIN_FILE}" --config-file="${CONFIGFILE}"
+        evaluate_retval force-reload
+    ;;
+
+    restart)
+        killproc -p "${PIDFILE}" "${BIN_FILE}"
+        sleep 1
+        if [ -e "${SOCKET}" ]; then
+            rm "${SOCKET}" 2> /dev/null
+        fi
+        start_daemon "${BIN_FILE}" --config-file="${CONFIGFILE}"
+        evaluate_retval restart
+    ;;
+
+    status)
+        statusproc
+    ;;
+
+    *)
+        echo "Usage: $0 {start|stop|force-reload|restart|status}"
+        exit 1
+    ;;
+
+esac
+
+# End $RC_BASE/init.d/messagebus

Added: trunk/bootscripts/contrib/lsb-v3/blfs/init.d/gdm
===================================================================
--- trunk/bootscripts/contrib/lsb-v3/blfs/init.d/gdm	                        (rev 0)
+++ trunk/bootscripts/contrib/lsb-v3/blfs/init.d/gdm	2008-09-07 16:57:38 UTC (rev 7583)
@@ -0,0 +1,54 @@
+#!/bin/sh
+# Begin /etc/init.d/gdm
+
+### BEGIN INIT INFO
+# Provides:            gpm
+# Required-Start:      $network dbus
+# Should-Start:        $remote_fs
+# Required-Stop:       $network dbus
+# Should-Stop:         $remote_fs
+# Default-Start:       5
+# Default-Stop:        0 1 2 3 4 6
+# Short-Description:   Starts/Stops the Gnome Display Manager (GUI Login). 
+# Description:         Starts and stops the Gnome Display Manager.
+# X-LFS-Provided-By:   BLFS
+### END INIT INFO
+
+. /lib/lsb/init-functions
+
+BIN_FILE="/opt/gnome-2.18.3/sbin/gdm"
+
+chk_stat
+
+case "$1" in
+    start)
+        MESSAGE="Starting GDM..."
+        /opt/gnome-2.20/sbin/gdm
+        evaluate_retval generic
+        ;;
+
+    stop)
+        MESSAGE="Stopping GDM..."
+        /opt/gnome-2.20/sbin/gdm-stop
+        evaluate_retval generic
+        ;;
+
+    reload)
+        MESSAGE="Reloding GDM (Safe)..."
+        /opt/gnome-2.20/sbin/gdm-safe-restart
+        evaluate_retval generic
+        ;;
+
+    restart)
+        MESSAGE="Restarting GDM..."
+        /opt/gnome-2.20/sbin/gdm-restart
+        evaluate_retval generic
+        ;;
+
+    *)
+        echo "Usage: $0 {start|stop|reload|restart}"
+        exit 1
+        ;;
+esac
+
+# End /etc/init.d/gdm

Added: trunk/bootscripts/contrib/lsb-v3/blfs/init.d/gpm
===================================================================
--- trunk/bootscripts/contrib/lsb-v3/blfs/init.d/gpm	                        (rev 0)
+++ trunk/bootscripts/contrib/lsb-v3/blfs/init.d/gpm	2008-09-07 16:57:38 UTC (rev 7583)
@@ -0,0 +1,89 @@
+#!/bin/sh
+# Begin /etc/init.d/gpm
+
+### BEGIN INIT INFO
+# Provides:            gpm
+# Required-Start:      $network
+# Should-Start:        $remote_fs
+# Required-Stop:       $network
+# Should-Stop:         $remote_fs
+# Default-Start:       3 4 5
+# Default-Stop:        0 1 2 6
+# Short-Description:   General Purpose Mouse (service)
+# Description:         The gpm service is used to provide mouse services
+#                      to console applications.
+# X-LFS-Default-Start: S70
+# X-LFS-Default-Stop:  K10
+# X-LFS-Provided-By:   BLFS
+### END INIT INFO
+
+. /lib/lsb/init-functions
+
+MESSAGE="GPM Console Mouse Service..."
+BIN_FILE=/usr/sbin/gpm
+CONFIG_FILE=/etc/sysconfig/mouse
+
+# Make certain that the binary exists, and that the config file exists
+chk_stat
+
+# Source the config file 
+. "${CONFIG_FILE}"
+
+case "$1" in
+
+    start)
+        start_daemon "${BIN_FILE}" -m "$MDEVICE" -t "$PROTOCOL" "$GPMOPTS"
+        evaluate_retval start
+    ;;
+
+    stop)
+        killproc "${BIN_FILE}"
+        evaluate_retval stop
+    ;;
+
+    restart)
+        # Restart service (if running) or start service
+        killproc "${BIN_FILE}"
+        sleep 1
+        start_daemon "${BIN_FILE}" -m "$MDEVICE" -t "$PROTOCOL" "$GPMOPTS"
+        evaluate_retval restart
+    ;;
+
+    force-reload)
+        # Forcefully Reload the configuartion. Usually a SIGHUP is used for 
+        # this, however, GPM doesn't support this signal as there is no 
+        # configuration to reload, so restart it (only if already running)
+        kill -0 `pidofproc "${BIN_FILE}"` 2> /dev/null
+        retval="${?}"
+        if [ "${retval}" = "0" ]
+        then
+            # restart it...
+            killproc "${BIN_FILE}"
+            sleep 1
+            "${BIN_FILE}" -m "$MDEVICE" -t "$PROTOCOL" "$GPMOPTS"
+            evaluate_retval force-reload
+        else
+            log_warning_msg "Force reloading ${MESSAGE}: Not running"
+            exit "${retval}"
+        fi
+    ;;
+
+    status)
+        statusproc
+    ;;
+
+    *)
+        echo "    Usage:  ${0}{start|stop|restart|force-reload|status}"
+        if [ "${1}" = "reload" -o "${1}" = "try-restart" ]
+        then
+            echo "    Error:  Unimplemented function '${1}'"
+            exit 3
+        else
+            exit 2
+        fi
+    ;;
+
+esac
+
+# End /etc/init.d/gpm
+

Added: trunk/bootscripts/contrib/lsb-v3/blfs/init.d/haldaemon
===================================================================
--- trunk/bootscripts/contrib/lsb-v3/blfs/init.d/haldaemon	                        (rev 0)
+++ trunk/bootscripts/contrib/lsb-v3/blfs/init.d/haldaemon	2008-09-07 16:57:38 UTC (rev 7583)
@@ -0,0 +1,50 @@
+#!/bin/sh
+# Begin $rc_base/init.d/haldaemon
+
+### BEGIN INIT INFO
+# Provides:            haldaemon
+# Required-Start:      dbus
+# Should-Start:        $remote_fs
+# Required-Stop:       dbus
+# Should-Stop:         $remote_fs
+# Default-Start:       3 4 5 
+# Default-Stop:        0 1 2 6
+# Short-Description:   Starts/Stops the D-Bus Messagebus daemon.
+# Description:         Starts and stops the D-Bus Messagebus daemon.
+# X-LFS-Provided-By:   BLFS
+### END INIT INFO
+
+. /lib/lsb/init-functions
+
+MESSAGE="the HAL Daemon..."
+BIN_FILE="/usr/sbin/hald"
+PIDFILE="/var/run/hald/pid"
+case "$1" in
+	start)
+		start_daemon "${BIN_FILE}" --use-syslog
+                evaluate_retval start
+		;;
+
+	stop)
+		killproc -p "${PIDFILE}" "${BIN_FILE}"
+                evaluate_retval stop
+		;;
+
+	restart)
+		killproc -p "${PIDFILE}" "${BIN_FILE}" &&
+		sleep 1 &&
+		start_daemon "${BIN_FILE}" --use-syslog
+                evaluate_retval restart
+		;;
+
+	status)
+		statusproc "${BIN_FILE}"
+		;;
+
+	*)
+		echo "Usage: $0 {start|stop|restart|status}"
+		exit 1
+		;;
+esac
+
+# End $rc_base/init.d/haldaemon

Added: trunk/bootscripts/contrib/lsb-v3/blfs/init.d/httpd
===================================================================
--- trunk/bootscripts/contrib/lsb-v3/blfs/init.d/httpd	                        (rev 0)
+++ trunk/bootscripts/contrib/lsb-v3/blfs/init.d/httpd	2008-09-07 16:57:38 UTC (rev 7583)
@@ -0,0 +1,57 @@
+#!/bin/sh
+# Begin /etc/init.d/httpd
+
+### BEGIN INIT INFO
+# Provides:            httpd
+# Required-Start:      $syslog $local_fs $network
+# Should-Start:        $remote_fs
+# Required-Stop:
+# Should-Stop:
+# Default-Start:       2 3 4 5
+# Default-Stop:        0 1 6
+# Short-Description:   Apache HTTP Daemon
+# Description:         Controls the Apache HTTP Daemon
+# X-LFS-Default-Start: S32
+# X-LFS-Default-Stop:  K28
+# X-LFS-Provided-By:   BLFS
+### END INIT INFO
+
+. /lib/lsb/init-functions
+
+MESSAGE="Apache HTTP Daemon"
+BIN_FILE=/usr/sbin/httpd
+CONFIG_FILE=/etc/apache/httpd.conf
+
+# Make certain that the binary exists, and that the config file exists
+chk_stat
+
+case "$1" in
+
+    start)
+        start_daemon /usr/sbin/apachectl -k start > /dev/null
+        evaluate_retval start
+    ;;
+
+    stop)
+        start_daemon /usr/sbin/apachectl -k stop > /dev/null
+        evaluate_retval stop
+    ;;
+
+    restart)
+        start_daemon /usr/sbin/apachectl -k restart > /dev/null
+        evaluate_retval restart
+    ;;
+
+    status)
+        statusproc
+        evaluate_retval generic
+    ;;
+
+    *)
+        echo "    Usage:  ${0}{start|stop|restart|status}"
+    ;;
+
+esac
+
+# End /etc/init.d/gpm
+

Added: trunk/bootscripts/contrib/lsb-v3/blfs/init.d/named
===================================================================
--- trunk/bootscripts/contrib/lsb-v3/blfs/init.d/named	                        (rev 0)
+++ trunk/bootscripts/contrib/lsb-v3/blfs/init.d/named	2008-09-07 16:57:38 UTC (rev 7583)
@@ -0,0 +1,62 @@
+#!/bin/sh
+# Begin /etc/init.d/named
+
+### BEGIN INIT INFO
+# Provides:            named
+# Required-Start:      $network
+# Should-Start:
+# Required-Stop:
+# Should-Stop:         netfs
+# Default-Start:       3 4 5
+# Default-Stop:        0 1 2 6
+# Short-Description:   Starts ISC Bind name server.
+# Description:         Starts ISC Bind name server.
+# X-LFS-Default-Start: S22
+# X-LFS-Default-Stop:  K49
+# X-LFS-Provided-By:   BLFS
+### END INIT INFO
+
+. /lib/lsb/init-functions
+
+MESSAGE="ISC Bind nameserver"
+BIN_FILE="/usr/sbin/named"
+PIDFILE="/srv/named/var/run/named.pid"
+
+case "$1" in
+    start)
+        start_daemon "${BIN_FILE}" -u named -t /srv/named \
+                                   -c /etc/named.conf
+        evaluate_retval start
+    ;;
+
+    stop)
+        # slapd needs SIGINT
+        killproc -p "${PIDFILE}" "${BIN_FILE}"
+	evaluate_retval stop
+    ;;
+
+    restart)
+        killproc -p "${PIDFILE}" "${BIN_FILE}"
+        sleep 1
+        start_daemon "${BIN_FILE}" -u named -t /srv/named \
+                                   -c /etc/named.conf
+	evaluate_retval restart
+    ;;
+
+    reload)
+        /usr/sbin/rndc -c /etc/rndc.conf reload
+        evaluate_retval reload
+    ;;
+
+    status)
+        statusproc
+    ;;
+
+    *)
+        echo "Usage: $0 {start|stop|restart|reload|status}"
+        exit 1
+    ;;
+
+esac
+
+# End $rc_base/init.d/named

Added: trunk/bootscripts/contrib/lsb-v3/blfs/init.d/nas
===================================================================
--- trunk/bootscripts/contrib/lsb-v3/blfs/init.d/nas	                        (rev 0)
+++ trunk/bootscripts/contrib/lsb-v3/blfs/init.d/nas	2008-09-07 16:57:38 UTC (rev 7583)
@@ -0,0 +1,53 @@
+#!/bin/sh
+# Begin $rc_base/init.d/nas
+
+### BEGIN INIT INFO
+# Provides:            nas
+# Required-Start:      $network
+# Should-Start:        $remote_fs
+# Required-Stop:       $network
+# Should-Stop:         $remote_fs
+# Default-Start:       3 4 5 
+# Default-Stop:        0 1 2 6
+# Short-Description:   Starts/Stops the Network Audio System Server.
+# Description:         Starts and stops the Network Audio System Server daemon.
+# X-LFS-Provided-By:   BLFS
+### END INIT INFO
+
+. /lib/lsb/init-functions
+
+MESSAGE="the Network Audio System Server..."
+
+case "$1" in
+        start)
+		start_daemon /opt/X11/bin/nasd -aa -b 2>&1 >> /dev/null
+                evaluate_retval start
+		;;
+
+        stop)
+                killproc /opt/X11/bin/nasd
+                evaluate_retval stop
+                ;;
+
+        reload)
+                reloadproc /opt/X11/bin/nasd
+                evaluate_retval reload
+                ;;
+
+        restart)
+                $0 stop
+                sleep 1
+                $0 start
+                ;;
+
+        status)
+                statusproc /opt/X11/bin/nasd
+                ;;
+
+        *)
+                echo "Usage: $0 {start|stop|reload|restart|status}"
+                exit 1
+                ;;
+esac
+
+# End $rc_base/init.d/nasd

Added: trunk/bootscripts/contrib/lsb-v3/blfs/init.d/ntpd
===================================================================
--- trunk/bootscripts/contrib/lsb-v3/blfs/init.d/ntpd	                        (rev 0)
+++ trunk/bootscripts/contrib/lsb-v3/blfs/init.d/ntpd	2008-09-07 16:57:38 UTC (rev 7583)
@@ -0,0 +1,68 @@
+#!/bin/sh
+# Begin /etc/init.d/ntpd
+
+### BEGIN INIT INFO
+# Provides:            ntp
+# Required-Start:      $time $network
+# Should-Start:
+# Required-Stop:
+# Should-Stop:
+# Default-Start:       3 4 5
+# Default-Stop:        0 1 2 6
+# Short-Description:   NTP Network Time Protocal
+# Description:         NTP Syncronizes time with time servers worldwide
+# X-LFS-Default-Start: S26
+# X-LFS-Default-Stop:  K46
+# X-LFS-Provided-By:   BLFS
+### END INIT INFO
+
+. /lib/lsb/init-functions
+
+MESSAGE="Network Time Protocal Daemon"
+BIN_FILE="/usr/sbin/ntpd"
+CONFIG_FILE="/etc/ntp.conf"
+PIDFILE="/var/run/ntpd.pid"
+
+# Make certain that the binary exists, and that the config file exists
+chk_stat
+
+case "$1" in
+
+    start)
+        ${BIN_FILE} -gqx &&
+        start_daemon -p "${PIDFILE}" "${BIN_FILE}"
+        evaluate_retval start
+    ;;
+
+    stop)
+        killproc -p "${PIDFILE}" "${BIN_FILE}"
+        evaluate_retval stop
+    ;;
+
+    restart)
+        # Restart service (if running) or start service
+        killproc -p "${PIDFILE}" "${BIN_FILE}" &&
+        sleep 1 &&
+        start_daemon -p "${PIDFILE}" "${BIN_FILE}"
+        evaluate_retval restart
+    ;;
+
+    status)
+        statusproc
+    ;;
+
+    *)
+        echo "    Usage:  ${0}{start|stop|restart|force-reload|status}"
+        if [ "${1}" = "reload" -o "${1}" = "try-restart" ]
+        then
+            echo "    Error:  Unimplemented function '${1}'"
+            exit 3
+        else
+            exit 2
+        fi
+    ;;
+
+esac
+
+# End /etc/init.d/ntpd
+

Added: trunk/bootscripts/contrib/lsb-v3/blfs/init.d/openldap1
===================================================================
--- trunk/bootscripts/contrib/lsb-v3/blfs/init.d/openldap1	                        (rev 0)
+++ trunk/bootscripts/contrib/lsb-v3/blfs/init.d/openldap1	2008-09-07 16:57:38 UTC (rev 7583)
@@ -0,0 +1,55 @@
+#!/bin/sh
+# Begin /etc/init.d/openldap
+
+### BEGIN INIT INFO
+# Provides:            openldap
+# Required-Start:      $network
+# Should-Start:
+# Required-Stop:
+# Should-Stop:         netfs
+# Default-Start:       3 4 5
+# Default-Stop:        0 1 2 6
+# Short-Description:   Starts OpenLDAP slapd.
+# Description:         Starts OpenLDAP slapd daemon.
+# X-LFS-Default-Start: S25
+# X-LFS-Default-Stop:  K46
+# X-LFS-Provided-By:   BLFS
+### END INIT INFO
+
+. /lib/lsb/init-functions
+
+MESSAGE="OpenLDAP slapd"
+BIN_FILE="/usr/sbin/slapd"
+PIDFILE="/srv/ldap/run/slapd.pid"
+
+case "$1" in
+    start)
+        start_daemon "${BIN_FILE}"
+        evaluate_retval start
+    ;;
+
+    stop)
+        # slapd needs SIGINT
+        killproc -p "${PIDFILE}" "${BIN_FILE}" -INT
+	evaluate_retval stop
+    ;;
+
+    restart)
+        killproc -p "${PIDFILE}" "${BIN_FILE}" -INT &&
+        sleep 1 &&
+        start_daemon "${BIN_FILE}"
+	evaluate_retval restart
+    ;;
+
+    status)
+        statusproc
+    ;;
+
+    *)
+        echo "Usage: $0 {start|stop|restart|status}"
+        exit 1
+    ;;
+
+esac
+
+# End $rc_base/init.d/openldap

Added: trunk/bootscripts/contrib/lsb-v3/blfs/init.d/postfix
===================================================================
--- trunk/bootscripts/contrib/lsb-v3/blfs/init.d/postfix	                        (rev 0)
+++ trunk/bootscripts/contrib/lsb-v3/blfs/init.d/postfix	2008-09-07 16:57:38 UTC (rev 7583)
@@ -0,0 +1,66 @@
+#!/bin/sh
+# Begin /etc/init.d/postfix
+
+### BEGIN INIT INFO
+# Provides:            postfix
+# Required-Start:      $syslog $local_fs $network
+# Should-Start:        $remote_fs
+# Required-Stop:
+# Should-Stop:
+# Default-Start:       2 3 4 5
+# Default-Stop:        0 1 6
+# Short-Description:   Postfix MTA
+# Description:         Controls the Postfix Mail Transfer Agent
+# X-LFS-Default-Start: S35
+# X-LFS-Default-Stop:  K25
+# X-LFS-Provided-By:   BLFS
+### END INIT INFO
+
+. /lib/lsb/init-functions
+
+MESSAGE="Postfix MTA"
+BIN_FILE="/usr/lib/postfix/master"
+CTRL_FILE="/usr/sbin/postfix"
+CONFIG_FILE="/etc/postfix/main.cf"
+PIDFILE="/var/spool/postfix/pid/master.pid"
+# Make certain that the binary exists, and that the config file exists
+chk_stat
+
+case "$1" in
+
+    start)
+        start_daemon -p "${PIDFILE}" "${CTRL_FILE}" start 2> /dev/null
+        evaluate_retval start
+    ;;
+
+    stop)
+        start_daemon "${CTRL_FILE}" stop 2> /dev/null
+        evaluate_retval stop
+    ;;
+
+    reload)
+        start_daemon "${CTRL_FILE}" reload 2> /dev/null
+        evaluate_retval reload
+    ;;
+
+    restart)
+        # Restart service (if running) or start service
+        start_daemon "${CTRL_FILE}" stop 2> /dev/null
+        sleep 1
+        start_daemon "${CTRL_FILE}" start 2> /dev/null
+        evaluate_retval restart
+    ;;
+
+    status)
+        statusproc "${BIN_FILE}" "Postfix MTA master process"
+        #evaluate_retval status
+    ;;
+
+    *)
+        echo "    Usage:  ${0}{start|stop|reload|restart|status}"
+    ;;
+
+esac
+
+# End /etc/init.d/gpm
+

Added: trunk/bootscripts/contrib/lsb-v3/blfs/init.d/samba
===================================================================
--- trunk/bootscripts/contrib/lsb-v3/blfs/init.d/samba	                        (rev 0)
+++ trunk/bootscripts/contrib/lsb-v3/blfs/init.d/samba	2008-09-07 16:57:38 UTC (rev 7583)
@@ -0,0 +1,71 @@
+#!/bin/sh
+# Begin /etc/init.d/samba
+
+### BEGIN INIT INFO
+# Provides:            samba
+# Required-Start:      $network
+# Should-Start:        
+# Required-Stop:       $network
+# Should-Stop:         $remote_fs
+# Default-Start:       3 4 5
+# Default-Stop:        0 1 2 6
+# Short-Description:   Provides SMB (Windows) networking.
+# Description:         Starts Samba smbd and nmbd processess which provide
+#                      connectivity to SMB (Windows) networks.
+# X-LFS-Default-Start: S45
+# X-LFS-Default-Stop:  K48
+# X-LFS-Provided-By:   BLFS
+### END INIT INFO
+
+. /lib/lsb/init-functions
+
+case "$1" in
+    start)
+        MESSAGE="nmbd..."
+        start_daemon /usr/sbin/nmbd -D
+        evaluate_retval start
+
+        MESSAGE="smbd..."
+        start_daemon /usr/sbin/smbd -D
+        evaluate_retval start
+    ;;
+
+    stop)
+        MESSAGE="smbd..."
+        killproc /usr/sbin/smbd
+        evaluate_retval stop
+
+        MESSAGE="nmbd..."
+        killproc /usr/sbin/nmbd
+        evaluate_retval stop
+    ;;
+
+	reload)
+        MESSAGE="smbd..."
+        killproc -HUP /usr/sbin/smbd
+        evaluate_retval reload
+
+        MESSAGE="nmbd..."
+        killproc -HUP /usr/sbin/nmbd
+        evlauate_retval reload
+    ;;
+
+    restart)
+        $0 stop
+        sleep 1
+        $0 start
+    ;;
+
+    status)
+        statusproc /usr/sbin/nmbd
+        statusproc /usr/sbin/smbd
+    ;;
+
+    *)
+        echo "Usage: $0 {start|stop|reload|restart|status}"
+        exit 1
+    ;;
+
+esac
+
+# End $rc_base/init.d/samba

Added: trunk/bootscripts/contrib/lsb-v3/blfs/init.d/sshd
===================================================================
--- trunk/bootscripts/contrib/lsb-v3/blfs/init.d/sshd	                        (rev 0)
+++ trunk/bootscripts/contrib/lsb-v3/blfs/init.d/sshd	2008-09-07 16:57:38 UTC (rev 7583)
@@ -0,0 +1,57 @@
+#!/bin/sh
+# Begin /etc/init.d/sshd
+
+### BEGIN INIT INFO
+# Provides:            sshd
+# Required-Start:      $network
+# Should-Start:        $remote_fs
+# Required-Stop:       $network
+# Should-Stop:         $remote_fs
+# Default-Start:       3 4 5 
+# Default-Stop:        0 1 2 6
+# Short-Description:   Starts/Stops the Secure Shell daemon.
+# Description:         Starts and stops the Secure Shell sshd daemon.
+# X-LFS-Provided-By:   BLFS
+### END INIT INFO
+
+. /lib/lsb/init-functions
+
+MESSAGE="SSH Server"
+BIN_FILE="/usr/sbin/sshd"
+
+chk_stat
+
+case "$1" in
+    start)
+        start_daemon "${BIN_FILE}"
+        evaluate_retval start
+        ;;
+
+    stop)
+        killproc "${BIN_FILE}"
+        evaluate_retval stop
+        ;;
+
+    reload)
+        killproc "${BIN_FILE}" -HUP
+        evaluate_retval reload
+        ;;
+
+    restart)
+        killproc "$BIN_FILE"
+        sleep 1
+        start_daemon "${BIN_FILE}"
+        evaluate_retval restart
+        ;;
+
+    status)
+        statusproc "${BIN_FILE}"
+        ;;
+
+    *)
+        echo "Usage: $0 {start|stop|reload|restart|status}"
+        exit 1
+        ;;
+esac
+
+# End /etc/init.d/sshd

Added: trunk/bootscripts/contrib/lsb-v3/sysconfig/network-devices/services/dhcpcd
===================================================================
--- trunk/bootscripts/contrib/lsb-v3/sysconfig/network-devices/services/dhcpcd	                        (rev 0)
+++ trunk/bootscripts/contrib/lsb-v3/sysconfig/network-devices/services/dhcpcd	2008-09-07 16:57:38 UTC (rev 7583)
@@ -0,0 +1,83 @@
+#!/bin/sh
+# Begin $network-devices/services/dhcpcd
+
+# Based upon lfs-bootscripts-1.12 $NETWORK_DEVICES/if{down,up}
+# Rewritten by Nathan Coulson <nathan at linuxfromscratch.org>
+# Adapted for dhcpcd by DJ Lucas <dj at lucasit.com>
+
+#$LastChangedBy: bdubbs $
+#$Date: 2005-08-01 13:29:19 -0600 (Mon, 01 Aug 2005) $
+
+#. /etc/sysconfig/rc
+#. $RC_FUNCTIONS
+
+. /lib/lsb/init-functions
+. $IFCONFIG
+
+PIDFILE="/var/run/dhcpcd-$1.pid"
+LEASEINFO="/var/lib/dhcpcd/dhcpcd-$1.info"
+
+case "$2" in
+        up)
+                message="Starting dhcpcd on the $1 interface..."
+                # Test to see if there is a stale pid file
+                if [ -f "$PIDFILE" ]
+                then
+                    ps `cat "$PIDFILE"` | grep dhcpcd > /dev/null
+                    if [ $? != 0 ]
+                    then
+                        rm -f /var/run/dhcpcd-$1.pid > /dev/null
+                    else
+			message="${message}dhcpcd already running!"
+                        log_warning_msg "${message}"
+                        exit 2
+                    fi
+                fi
+                /sbin/dhcpcd $1 $DHCP_START
+		# Save the return value
+                RET="${?}"
+                ( exit "${RET}"; )
+                evaluate_retval standard
+		# Print the assigned settings if requested
+		if [ "$RET" = "0" -a "$PRINTIP" = "yes" ]; then
+			. "$LEASEINFO"
+			if [ "$PRINTALL" = "yes" ]; then
+				echo "           DHCP Assigned Settings for $1:"
+				echo "           IP Address:      $IPADDR"
+				echo "           Subnet Mask:     $NETMASK"
+				echo "           Default Gateway: $GATEWAYS"
+				echo "           DNS Server:      $DNSSERVERS"
+			else
+				echo " IP Addresss: ""$IPADDR"
+			fi
+                fi
+        ;;
+
+        down)
+		message="Stopping dhcpcd on the $1 interface..."
+		if [ -z "$DHCP_STOP" ]
+		then
+		    killproc -p "${PIDFILE}" /sbin/dhcpcd
+		    evaluate_retval standard
+		else
+		    /sbin/dhcpcd $1 $DHCP_STOP &> /dev/null
+		    RET="$?"
+		    if [ "$RET" -eq 0 ]; then
+			echo -n ""
+			evaluate_retval standard
+		    elif [ "$RET" -eq 1 ]; then
+			message="${message}dhcpcd not running!"
+			log_warning_msg "${message}"
+		    else
+			log_failure_msg "${message}"
+		    fi
+		fi
+        ;;
+
+        *)
+                echo "Usage: $0 [interface] {up|down}"
+                exit 1
+        ;;
+esac
+
+# End $NETWORK_DEVICES/services/dhcpcd


Property changes on: trunk/bootscripts/contrib/lsb-v3/sysconfig/network-devices/services/dhcpcd
___________________________________________________________________
Name: svn:executable
   + *




More information about the blfs-book mailing list