From 559d3ad2cf030968bc563b260eedf81eb06dc362 Mon Sep 17 00:00:00 2001 From: ms Date: Mon, 8 Jan 2007 21:41:01 +0000 Subject: [PATCH] Ein Paar noch unbearbeitet Bootscripts hinzugefuegt. git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@387 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8 --- config/rootfiles/common/libmng | 7 ++ src/initscripts/init.d/cups | 44 ++++++++++++ src/initscripts/init.d/cyrus-sasl | 40 +++++++++++ src/initscripts/init.d/mysql | 78 +++++++++++++++++++++ src/initscripts/init.d/nfs-server | 108 ++++++++++++++++++++++++++++++ src/initscripts/init.d/portmap | 38 +++++++++++ src/initscripts/init.d/samba | 55 +++++++++++++++ src/initscripts/init.d/xinetd | 45 +++++++++++++ 8 files changed, 415 insertions(+) create mode 100644 config/rootfiles/common/libmng create mode 100644 src/initscripts/init.d/cups create mode 100644 src/initscripts/init.d/cyrus-sasl create mode 100644 src/initscripts/init.d/mysql create mode 100644 src/initscripts/init.d/nfs-server create mode 100644 src/initscripts/init.d/portmap create mode 100644 src/initscripts/init.d/samba create mode 100644 src/initscripts/init.d/xinetd diff --git a/config/rootfiles/common/libmng b/config/rootfiles/common/libmng new file mode 100644 index 0000000000..df688f58cc --- /dev/null +++ b/config/rootfiles/common/libmng @@ -0,0 +1,7 @@ +#usr/include/libmng.h +#usr/include/libmng_conf.h +#usr/include/libmng_types.h +#usr/lib/libmng.a +usr/lib/libmng.so +usr/lib/libmng.so.1 +usr/lib/libmng.so.1.1.0.9 diff --git a/src/initscripts/init.d/cups b/src/initscripts/init.d/cups new file mode 100644 index 0000000000..1e6f8ea644 --- /dev/null +++ b/src/initscripts/init.d/cups @@ -0,0 +1,44 @@ +#!/bin/sh +# Begin $rc_base/init.d/cups + +#$LastChangedBy: bdubbs $ +#$Date: 2005-08-01 14:29:19 -0500 (Mon, 01 Aug 2005) $ + +# Start or stop the CUPS server based upon the first argument to the script. + +. /etc/sysconfig/rc +. $rc_functions + +case $1 in + start) + boot_mesg "Starting CUPS Printserver..." + loadproc /usr/sbin/cupsd + ;; + + stop) + boot_mesg "Stopping CUPS Printserver..." + killproc /usr/sbin/cupsd + ;; + + reload) + boot_mesg "Reloading CUPS Printserver..." + reloadproc /usr/sbin/cupsd + ;; + + restart) + $0 stop + sleep 1 + $0 start + ;; + + status) + statusproc /usr/sbin/cupsd + ;; + + *) + echo "Usage: $0 {start|stop|reload|restart|status}" + exit 1 + ;; +esac + +# End $rc_base/init.d/cups diff --git a/src/initscripts/init.d/cyrus-sasl b/src/initscripts/init.d/cyrus-sasl new file mode 100644 index 0000000000..1b70725586 --- /dev/null +++ b/src/initscripts/init.d/cyrus-sasl @@ -0,0 +1,40 @@ +#!/bin/sh +# Begin $rc_base/init.d/cyrus-sasl + +# Based on sysklogd script from LFS-3.1 and earlier. +# Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org + +#$LastChangedBy: bdubbs $ +#$Date: 2005-08-01 14:29:19 -0500 (Mon, 01 Aug 2005) $ + +. /etc/sysconfig/rc +. $rc_functions + +case "$1" in + start) + boot_mesg "Starting the Cyrus SASL Server..." + loadproc /usr/sbin/saslauthd -a pam + ;; + + stop) + boot_mesg "Stopping the Cyrus SASL Server..." + killproc /usr/sbin/saslauthd + ;; + + restart) + $0 stop + sleep 1 + $0 start + ;; + + status) + statusproc /usr/sbin/saslauthd + ;; + + *) + echo "Usage: $0 {start|stop|restart|status}" + exit 1 + ;; +esac + +# End $rc_base/init.d/cyrus-sasl diff --git a/src/initscripts/init.d/mysql b/src/initscripts/init.d/mysql new file mode 100644 index 0000000000..994e3c220b --- /dev/null +++ b/src/initscripts/init.d/mysql @@ -0,0 +1,78 @@ +#!/bin/sh +# Begin $rc_base/init.d/mysql + +# Based on sysklogd script from LFS-3.1 and earlier. +# Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org + +#$LastChangedBy: bdubbs $ +#$Date: 2005-08-01 14:29:19 -0500 (Mon, 01 Aug 2005) $ + +. /etc/sysconfig/rc +. $rc_functions + +PIDFILE=/srv/mysql/`/bin/hostname`.pid +KILLDELAY=20 + +case "$1" in + start) + boot_mesg -n "Starting MySQL daemon..." + failure=0 + if [ -f "$PIDFILE" ] + then + if /bin/ps p `cat $PIDFILE` | grep mysqld >/dev/null + then + boot_mesg "mysqld already running!" ${WARNING} + echo_warning + exit 0 + else + rm -f "$PIDFILE" + if [ -f "$PIDFILE" ] + then + failure=1 + fi + fi + fi + if [ "$failure" = "1" ] + then + echo "" + echo_failure + else + echo "" + /usr/bin/mysqld_safe --user=mysql 2>&1 >/dev/null & + evaluate_retval + fi + ;; + + stop) + boot_mesg -n "Stopping MySQL daemon..." + if [ -e "$PIDFILE" ] + then + echo "" + killproc -p ${PIDFILE} /usr/bin/mysqld_safe + else + boot_mesg "mysqld not running!" ${WARNING} + echo_warning + if [ -e "$PIDFILE" ] + then + rm -f $PIDFILE + fi + fi + ;; + + restart) + $0 stop + sleep 1 + $0 start + ;; + + status) + statusproc /usr/sbin/mysqld + ;; + + *) + echo "Usage: $0 {start|stop|restart|status}" + exit 1 + ;; +esac + +# End $rc_base/init.d/mysql diff --git a/src/initscripts/init.d/nfs-server b/src/initscripts/init.d/nfs-server new file mode 100644 index 0000000000..5e044286c0 --- /dev/null +++ b/src/initscripts/init.d/nfs-server @@ -0,0 +1,108 @@ +#!/bin/sh +# Begin $rc_base/init.d/nfs-server + +# Based on sysklogd script from LFS-3.1 and earlier. +# Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org + +#$LastChangedBy: bdubbs $ +#$Date: 2006-09-10 19:41:47 -0500 (Sun, 10 Sep 2006) $ + +. /etc/sysconfig/rc +. $rc_functions +. /etc/sysconfig/nfs-server + +case "$1" in + start) + boot_mesg "Starting NFS mountd..." + loadproc /usr/sbin/rpc.mountd + + boot_mesg "Starting NFS nfsd..." + loadproc /usr/sbin/rpc.nfsd -p $PORT $PROCESSES + + boot_mesg "Starting NFS statd..." + loadproc /usr/sbin/rpc.statd + + if [ "$QUOTAS" = "yes" ]; then + boot_mesg "Starting NFS rquotad..." + loadproc /usr/sbin/rpc.rquotad + fi + + # NFSD support only in 2.6 kernel + /bin/uname -r | /bin/grep "2.6" 2>&1 > /dev/null + if [ $? = 0 ]; then + boot_mesg "Mounting nfsd virtual filesystem..." + /bin/mount -t nfsd none /proc/fs/nfsd 2>&1 > /dev/null + evaluate_retval + fi + + # Make ceratin that the list is refreshed on + # a restart. + boot_mesg "Exporting NFS Filesystems..." + /usr/sbin/exportfs -ra 2>&1 > /dev/null + evaluate_retval + ;; + + stop) + boot_mesg "Stopping NFS statd..." + killproc /usr/sbin/rpc.statd + + boot_mesg "Stopping NFS nfsd..." + # nfsd needs HUP.... + killproc nfsd HUP + + boot_mesg "Stopping NFS mountd..." + killproc /usr/sbin/rpc.mountd + + if [ "$QUOTAS" = "yes" ]; then + boot_mesg "Stopping NFS rquotad..." + killproc /usr/sbin/rpc.rquotad + fi + + boot_mesg "Refreshing NFS Exported Filesystems..." + /usr/sbin/exportfs -au 2>&1 > /dev/null + evaluate_retval + + # NFSD support only in 2.6 kernel + /bin/uname -r | /bin/grep "2.6" 2>&1 > /dev/null + if [ $? = 0 ]; then + boot_mesg "Unmounting NFS Virtual Filesystem..." + /bin/umount /proc/fs/nfsd 2>&1 > /dev/null + evaluate_retval + fi + + # Remove a pid file that isn't done automatically + boot_mesg "Removing the rpc.statd pid file if it exists" + if [ -f /var/run/rpc.statd.pid ]; then + rm -f /var/run/rpc.statd.pid + fi + ;; + + reload) + boot_mesg "Reloading NFS Server..." + /usr/sbin/exportfs -ra + evaluate_retval + ;; + + restart) + $0 stop + sleep 1 + $0 start + ;; + + status) + statusproc /usr/sbin/rpc.mountd + ## Special case for nfsd with no full path + statusproc nfsd + statusproc /usr/sbin/rpc.statd + if [ "$QUOTA" = "yes" ]; then + statusproc rpc.rquotad + fi + ;; + + *) + echo "Usage: $0 {start|stop|reload|restart|status}" + exit 1 + ;; +esac + +# End $rc_base/init.d/nfs-server diff --git a/src/initscripts/init.d/portmap b/src/initscripts/init.d/portmap new file mode 100644 index 0000000000..00516a2984 --- /dev/null +++ b/src/initscripts/init.d/portmap @@ -0,0 +1,38 @@ +#!/bin/sh +# Begin $rc_base/init.d/portmap + +#$LastChangedBy: bdubbs $ +#$Date: 2005-08-01 14:29:19 -0500 (Mon, 01 Aug 2005) $ + +. /etc/sysconfig/rc +. $rc_functions + +case "$1" in + start) + boot_mesg "Starting RPC Portmap" + loadproc /sbin/portmap + ;; + + stop) + boot_mesg "Stopping Portmap" + killproc /sbin/portmap + ;; + + restart) + $0 stop + sleep 1 + $0 start + ;; + + status) + statusproc /sbin/portmap + ;; + + *) + echo "Usage: $0 {start|stop|restart|status}" + exit 1 + ;; + +esac + +# End $rc_base/init.d/portmap diff --git a/src/initscripts/init.d/samba b/src/initscripts/init.d/samba new file mode 100644 index 0000000000..32067ab839 --- /dev/null +++ b/src/initscripts/init.d/samba @@ -0,0 +1,55 @@ +#!/bin/sh +# Begin $rc_base/init.d/samba + +# Based on sysklogd script from LFS-3.1 and earlier. +# Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org + +#$LastChangedBy: bdubbs $ +#$Date: 2005-08-01 14:29:19 -0500 (Mon, 01 Aug 2005) $ + +. /etc/sysconfig/rc +. $rc_functions + +case "$1" in + start) + boot_mesg "Starting nmbd..." + loadproc /usr/sbin/nmbd -D + + boot_mesg "Starting smbd..." + loadproc /usr/sbin/smbd -D + ;; + + stop) + boot_mesg "Stopping smbd..." + killproc /usr/sbin/smbd + + boot_mesg "Stopping nmbd..." + killproc /usr/sbin/nmbd + ;; + + reload) + boot_mesg "Reloading smbd..." + reloadproc /usr/sbin/smbd + + boot_mesg "Reloading nmbd..." + reloadproc /usr/sbin/nmbd + ;; + + 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 diff --git a/src/initscripts/init.d/xinetd b/src/initscripts/init.d/xinetd new file mode 100644 index 0000000000..36ef45a2bd --- /dev/null +++ b/src/initscripts/init.d/xinetd @@ -0,0 +1,45 @@ +#!/bin/sh +# Begin $rc_base/init.d/xinetd + +# Based on sysklogd script from LFS-3.1 and earlier. +# Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org + +#$LastChangedBy: bdubbs $ +#$Date: 2005-08-01 14:29:19 -0500 (Mon, 01 Aug 2005) $ + +. /etc/sysconfig/rc +. $rc_functions + +case "$1" in + start) + boot_mesg "Starting xinetd..." + loadproc /usr/sbin/xinetd + ;; + + stop) + boot_mesg "Stopping xinetd..." + killproc /usr/sbin/xinetd + ;; + + reload) + boot_mesg "Reloading xinetd..." + reloadproc /usr/sbin/xinetd + ;; + + restart) + $0 stop + sleep 1 + $0 start + ;; + + status) + statusproc /usr/sbin/xinetd + ;; + + *) + echo "Usage: $0 {start|stop|reload|restart|status}" + exit 1 + ;; +esac + +# End $rc_base/init.d/xinetd -- 2.39.2