cvs commit: BLFS/bootscripts/blfs/sysconfig/network-devices/services dhclient dhcpcd ipx pppoe

tushar at linuxfromscratch.org tushar at linuxfromscratch.org
Thu May 13 23:05:37 PDT 2004


tushar      04/05/14 00:05:36

  Added:       bootscripts/blfs/init.d alsa apache bind cups dhcp exim fam
                        fcron gdm gpm heimdal lisa lprng mysql netfs
                        nfs-client nfs-server ntp portmap postfix
                        postgresql proftpd random rsyncd samba sendmail
                        sshd xinetd
               bootscripts/blfs/sysconfig/network-devices/services dhclient
                        dhcpcd ipx pppoe
  Log:
  The rest of the files for blfs-bootscripts
  
  Revision  Changes    Path
  1.1                  BLFS/bootscripts/blfs/init.d/alsa
  
  Index: alsa
  ===================================================================
  #!/bin/sh
  # Begin $rc_base/init.d/alsa
  
  # Based on sysklogd script from LFS-3.1 and earlier.
  # Rewritten by Gerard Beekmans  - gerard at linuxfromscratch.org
  # ALSA specific parts by Mark Hymers - markh at linuxfromscratch.org
  # Stores mixer settings in the default location: /etc/asound.state
  
  . /etc/sysconfig/rc
  . $rc_functions
  
  case "$1" in
  	start)
  		echo "Starting ALSA...    Restoring volumes..."
  		loadproc /usr/sbin/alsactl restore
  		#echo "                    Loading MIDI font..."
  		#loadproc sfxload /path/to/soundfont
  		;;
  
  	stop)
  		echo "Stopping ALSA...    Saving volumes..."
  		loadproc /usr/sbin/alsactl store
  		#echo "                    Removing MIDI font..."
  		#loadproc sfxload -i
  		;;
  
  	restart)
  		$0 stop
  		sleep 1
  		$0 start
  		;;
  
  	*)
  		echo "Usage: $0 {start|stop|restart}"
  		exit 1
  		;;
  esac
  
  # End $rc_base/init.d/alsa
  
  
  
  1.1                  BLFS/bootscripts/blfs/init.d/apache
  
  Index: apache
  ===================================================================
  #!/bin/sh
  # Begin $rc_base/init.d/apache
  
  # Based on sysklogd script from LFS-3.1 and earlier.
  # Rewritten by Gerard Beekmans  - gerard at linuxfromscratch.org
  
  . /etc/sysconfig/rc
  . $rc_functions
  
  case "$1" in
  	start)
  		echo "Starting Apache daemon..."
  		/usr/sbin/apachectl -k start
  		evaluate_retval
  		;;
  
  	stop)
  		echo "Stopping Apache daemon..."
  		/usr/sbin/apachectl -k stop
  		evaluate_retval
  		;;
  
  	restart)
  		echo "Restarting Apache daemon..."
  		/usr/sbin/apachectl -k restart
  		evaluate_retval
  		;;
  
  	status)
  		statusproc /usr/sbin/httpd
  		;;
  
  	*)
  		echo "Usage: $0 {start|stop|restart|status}"
  		exit 1
  		;;
  esac
  
  # End $rc_base/init.d/apache
  
  
  
  1.1                  BLFS/bootscripts/blfs/init.d/bind
  
  Index: bind
  ===================================================================
  #!/bin/sh
  # Begin $rc_base/init.d/bind
  
  # Based on sysklogd script from LFS-3.1 and earlier.
  # Rewritten by Gerard Beekmans  - gerard at linuxfromscratch.org
  
  . /etc/sysconfig/rc
  . $rc_functions
  
  case "$1" in
  	start)
  		echo "Starting named..."
  		loadproc /usr/sbin/named -u named -t /home/named -c \
  			/etc/named.conf
  		;;
  
  	stop)
  		echo "Stopping named..."
  		killproc /usr/sbin/named
  		;;
  
  	restart)
  		$0 stop
  		sleep 1
  		$0 start
  		;;
  
  	reload)
  		echo "Reloading named..."
  		/usr/sbin/rndc -c /etc/rndc.conf reload
  		;;
  
  	status)
  		statusproc /usr/sbin/named
  		;;
  
  	*)
  		echo "Usage: $0 {start|stop|restart|status}"
  		exit 1
  		;;
  esac
  
  # End $rc_base/init.d/bind
  
  
  
  1.1                  BLFS/bootscripts/blfs/init.d/cups
  
  Index: cups
  ===================================================================
  #!/bin/sh
  # Begin $rc_base/init.d/cups
  
  # Start or stop the CUPS server based upon the first argument to the script.
  
  . /etc/sysconfig/rc
  . $rc_functions
  
  case $1 in
  	start)
  		echo "Starting CUPS Printserver..."
  		loadproc /usr/sbin/cupsd
  		;;
  
  	stop)
  		echo "Stopping CUPS Printserver..."
  		killproc cupsd
  		;;
  
  	reload)
  		echo "Reloading CUPS Printserver..."
  		reloadproc /usr/sbin/cupsd
  		;;
  
  	restart)
  		$0 stop
  		sleep 1
  		$0 start
  		;;
  
  	status)
  		statusproc cupsd
  		;;
  
  	*)
  		echo "Usage: $0 {start|stop|reload|restart|status}"
  		exit 1
  		;;
  esac
  
  # End $rc_base/init.d/cups
  
  
  
  1.1                  BLFS/bootscripts/blfs/init.d/dhcp
  
  Index: dhcp
  ===================================================================
  #!/bin/sh
  # Begin $rc_base/init.d/dhcp
  
  # Based on sysklogd script from LFS-3.1 and earlier.
  # Rewritten by Gerard Beekmans  - gerard at linuxfromscratch.org
  
  . /etc/sysconfig/rc
  . $rc_functions
  
  case "$1" in
  	start)
  		echo "Starting DHCP Server..."
  		loadproc dhcpd -q eth1
  		;;
  
  	stop)
  		echo "Stopping DHCP Server..."
  		killproc dhcpd
  		;;
  
  	reload)
  		echo "Reloading DHCP Server..."
  		reloadproc dhcpd
  		;;
  
  	restart)
  		$0 stop
  		sleep 1
  		$0 start
  		;;
  
  	status)
  		statusproc dhcpd
  		;;
  
  	*)
  		echo "Usage: $0 {start|stop|reload|restart|status}"
  		exit 1
  		;;
  esac
  
  # End $rc_base/init.d/dhcp
  
  
  
  1.1                  BLFS/bootscripts/blfs/init.d/exim
  
  Index: exim
  ===================================================================
  #!/bin/sh
  # Begin $rc_base/init.d/exim
  
  # Based on sysklogd script from LFS-3.1 and earlier.
  # Rewritten by Gerard Beekmans  - gerard at linuxfromscratch.org
  
  . /etc/sysconfig/rc
  . $rc_functions
  
  case "$1" in
  	start)
  		echo "Starting exim..."
  		loadproc /usr/sbin/exim -bd -q1m
  		;;
  
  	stop)
  		echo "Stopping exim..."
  		killproc exim
  		;;
  
  	status)
  		statusproc exim
  		;;
  
  	restart)
  		$0 stop
  		sleep 1
  		$0 start
  		;;
  
  	*)
  		echo "Usage: $0 {start|stop|status|restart}"
  		exit 1
  		;;
  esac
  
  # End $rc_base/init.d/exim
  
  
  
  1.1                  BLFS/bootscripts/blfs/init.d/fam
  
  Index: fam
  ===================================================================
  #!/bin/sh
  # Begin $rc_base/init.d/fam
  
  # Based on sysklogd script from LFS-3.1 and earlier.
  # Rewritten by Gerard Beekmans  - gerard at linuxfromscratch.org
  
  . /etc/sysconfig/rc
  . $rc_functions
  
  case "$1" in
  	start)
  		echo "Starting File Alteration Monitor..."
  		loadproc famd -T 0
  		;;
  
  	stop)
  		echo "Stopping File Alteration Monitor..."
  		killproc famd
  		;;
  
  	reload)
  		echo "Reloading File Alteration Monitor..."
  		reloadproc famd
  		;;
  
  	restart)
  		$0 stop
  		sleep 1
  		$0 start
  		;;
  
  	status)
  		statusproc famd
  		;;
  
  	*)
  		echo "Usage: $0 {start|stop|reload|restart|status}"
  		exit 1
  		;;
  esac
  
  # End $rc_base/init.d/fam
  
  
  
  1.1                  BLFS/bootscripts/blfs/init.d/fcron
  
  Index: fcron
  ===================================================================
  #!/bin/sh
  # Begin $rc_base/init.d/fcron
  
  # Based on sysklogd script from LFS-3.1 and earlier.
  # Rewritten by Gerard Beekmans  - gerard at linuxfromscratch.org
  
  . /etc/sysconfig/rc
  . $rc_functions
  
  case "$1" in
  	start)
  		echo "Starting fcron..."
  		loadproc fcron
  		;;
  
  	stop)
  		echo "Stopping fcron..."
  		killproc fcron
  		;;
  
  	restart)
  		$0 stop
  		sleep 1
  		$0 start
  		;;
  
  	status)
  		statusproc fcron
  		;;
  
  	*)
  		echo "Usage: $0 {start|stop|restart|status}"
  		exit 1
  		;;
  esac
  
  # End $rc_base/init.d/fcron
  
  
  
  1.1                  BLFS/bootscripts/blfs/init.d/gdm
  
  Index: gdm
  ===================================================================
  #!/bin/sh
  # Begin $rc_base/init.d/gdm
  
  # Based on sysklogd script from LFS-3.1 and earlier.
  # Rewritten by Gerard Beekmans  - gerard at linuxfromscratch.org
  
  . /etc/sysconfig/rc
  . $rc_functions
  
  export PATH=$PATH:/opt/gnome-2.4/bin:/opt/gnome-2.4/sbin
  
  case "$1" in
  	start)
  		echo "Starting GDM..."
  		loadproc gdm
  		;;
  
  	stop)
  		echo "Stopping GDM..."
  		if [ -f /var/run/gdm.pid ]; then
  			loadproc gdm-stop
  		fi
  		;;
  
  	reload)
  		echo "Reloading GDM..."
  		reloadproc gdm-safe-restart
  		;;
  
  	restart)
  		echo "Restarting GDM..."
  		loadproc gdm-restart
  		;;
  
  	*)
  		echo "Usage: $0 {start|stop|reload|restart}"
  		exit 1
  		;;
  esac
  
  # End $rc_base/init.d/gdm
  
  
  
  1.1                  BLFS/bootscripts/blfs/init.d/gpm
  
  Index: gpm
  ===================================================================
  #!/bin/sh
  # Begin $rc_base/init.d/gpm
  
  # Based on sysklogd script from LFS-3.1 and earlier.
  # Rewritten by Gerard Beekmans  - gerard at linuxfromscratch.org
  # GPM specific parts by Mark Hymers - markh at linuxfromscratch.org
  
  . /etc/sysconfig/rc
  . $rc_functions
  
  if [ -f /etc/sysconfig/mouse ]
  	then
  	. /etc/sysconfig/mouse
  fi
  
  if [ -z "$MDEVICE" ] || [ -z "$PROTOCOL" ]
  	then
  	echo "Please create an /etc/sysconfig/mouse file containing"
  	echo "MDEVICE and PROTOCOL values"
  	exit 1;
  fi
  
  case "$1" in
  	start)
  		echo "Starting gpm..."
  		loadproc gpm -m $MDEVICE -t $PROTOCOL
  		;;
  
  	stop)
  		echo "Stopping gpm..."
  		killproc gpm
  		;;
  
  	restart)
  		$0 stop
  		sleep 1
  		$0 start
  		;;
  
  	status)
  		statusproc gpm
  		;;
  
  	*)
  		echo "Usage: $0 {start|stop|restart|status}"
  		exit 1
  		;;
  esac
  
  # End $rc_base/init.d/gpm
  
  
  
  1.1                  BLFS/bootscripts/blfs/init.d/heimdal
  
  Index: heimdal
  ===================================================================
  #!/bin/sh
  # Begin $rc_base/init.d/heimdal
  
  # Based on sysklogd script from LFS-3.1 and earlier.
  # Rewritten by Gerard Beekmans  - gerard at linuxfromscratch.org
  # Heimdal bootscript submitted by Randy McMurchy - LFS-User at mcmurchy.com
  
  . /etc/sysconfig/rc
  . $rc_functions
  
  case "$1" in
  	start)  
  		echo "Starting KDC Server Daemon..."
  		if test -f "/var/run/kdc.pid"
  		then
  			print_status warning running
  		else
  			/usr/sbin/kdc &
  			sleep 1
  			if test -f "/var/run/kdc.pid"
  			then
  				print_status success
  			else
  				print_status failure
  			fi
  		fi
  		echo "Starting KDC kpasswdd Daemon..."
  		if test -f "/var/run/kpasswdd.pid"
  		then
  			print_status warning running
  		else
  			/usr/sbin/kpasswdd &
  			sleep 1
  			if test -f "/var/run/kpasswdd.pid"
  			then
  				print_status success
  			else
  				print_status failure
  			fi
  		fi
  		;;
  
  	stop)   
  		echo "Stopping KDC kpasswdd Daemon..."
  		killproc /usr/sbin/kpasswdd
  		echo "Stopping KDC Server Daemon..."
  		killproc /usr/sbin/kdc
  		;;
  
  	restart)
  		$0 stop
  		sleep 1
  		$0 start
  		;;
  
  	status)
  		statusproc /usr/sbin/kdc
  		statusproc /usr/sbin/kpasswdd
  		;;
  
  	*)
  		echo "Usage: $0 {start|stop|restart|status}"
  		exit 1
  		;;
  esac
  
  # End $rc_base/init.d/heimdal
  
  
  
  1.1                  BLFS/bootscripts/blfs/init.d/lisa
  
  Index: lisa
  ===================================================================
  #!/bin/sh
  # Begin $rc_base/init.d/lisa
  
  # Based on sysklogd script from LFS-3.1 and earlier.
  # Rewritten by Gerard Beekmans  - gerard at linuxfromscratch.org
  # LISA bootscript submitted by Randy McMurchy - LFS-User at mcmurchy.com
  
  . /etc/sysconfig/rc
  . $rc_functions
  
  export PATH=$PATH:/opt/kde/bin
  
  case "$1" in
          start)
                  echo "Starting LISA Daemon..."
                  loadproc lisa
                  ;;
  
          stop)
                  echo "Stopping LISA Daemon..."
                  killproc lisa
                  ;;
  
          reload)
                  echo "Reloading LISA Daemon..."
                  reloadproc lisa
                  ;;
  
          restart)
                  $0 stop
                  sleep 1
                  $0 start
                  ;;
  
          status)
                  statusproc lisa
                  ;;
  
          *)
                  echo "Usage: $0 {start|stop|reload|restart|status}"
                  exit 1
                  ;;
  esac
  
  # End $rc_base/init.d/lisa
  
  
  
  1.1                  BLFS/bootscripts/blfs/init.d/lprng
  
  Index: lprng
  ===================================================================
  #!/bin/sh
  # Begin $rc_base/init.d/lprng
  
  # Based on sysklogd script from LFS-3.1 and earlier.
  # Rewritten by Gerard Beekmans  - gerard at linuxfromscratch.org
  
  . /etc/sysconfig/rc
  . $rc_functions
  
  case "$1" in
  	start)
  		echo "Starting lpd..."
  		loadproc /usr/sbin/lpd
  		;;
  
  	stop)
  		echo "Stopping lpd..."
  		killproc /usr/sbin/lpd
  		;;
  
  	reload)
  		echo "Reloading lpd..."
  		reloadproc /usr/sbin/lpd
  		;;
  
  	restart)
  		$0 stop
  		sleep 1
  		$0 start
  		;;
  
  	status)
  		statusproc /usr/sbin/lpd
  		;;
  
  	*)
  		echo "Usage: $0 {start|stop|reload|restart|status}"
  		exit 1
  		;;
  esac
  
  # End $rc_base/init.d/lprng
  
  
  
  1.1                  BLFS/bootscripts/blfs/init.d/mysql
  
  Index: mysql
  ===================================================================
  #!/bin/sh
  # Begin $rc_base/init.d/mysql
  
  # Based on sysklogd script from LFS-3.1 and earlier.
  # Rewritten by Gerard Beekmans  - gerard at linuxfromscratch.org
  
  . /etc/sysconfig/rc
  . $rc_functions
  
  pid_file=/var/lib/mysql/`/bin/hostname`.pid
  
  case "$1" in
  	start)
  		echo "Starting MySQL daemon..."
  		failure=0
  		if test -f "$pid_file"
  		then
  			if /bin/ps p `cat $pid_file` | grep mysqld >/dev/null
  			then
  				print_status warning running
  				exit 0
  			else
  				rm -f $pid_file
  				if test -f $pid_file
  				then
  					failure=1
  				fi
  			fi
  		fi
  		if [ $failure = 1 ]
  		then
  			print_status failure
  		else
  			/usr/bin/mysqld_safe --user=mysql 2>&1 >/dev/null &
  			evaluate_retval
  		fi
  		;;
  
  	stop)
  		echo "Stopping MySQL daemon..."
  		if test -s "$pid_file"
  		then
  			kill `cat $pid_file`
  			sleep 1
  			failure=0
  			while [ -s $pid_file -a "$flags" != aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ]
  			do
  				[ -z "$flags" ]
  				flags=a$flags
  				sleep 1
  			done
  			if [ -s $pid_file ]
  				then failure=1
  			fi
  			(exit $failure)
  			evaluate_retval
  		else
  			print_status warning not_running
  		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
  
  
  
  1.1                  BLFS/bootscripts/blfs/init.d/netfs
  
  Index: netfs
  ===================================================================
  #!/bin/sh
  # Begin $rc_base/init.d/netfs
  
  # Based on sysklogd script from LFS-3.1 and earlier.
  # Rewritten by Gerard Beekmans  - gerard at linuxfromscratch.org
  # netfs script written by Nathan Coulson - conathan at conet.dyndns.org
  # and by DJ Lucas - dj at lucasit.com
  
  . /etc/sysconfig/rc
  . $rc_functions
  
  case "$1" in
  	start)
  		# The following line mounts all entries in fstab that
  		# have the _netdev option.  This is required for network
  		# filesystems to be mounted at boot time.
  		echo "Mounting network volumes..."
  		mount -a -O _netdev
  		evaluate_retval
  		;;
  
  	stop)
  		echo -n "Unmounting network volumes..."
  
  		# The following line obtains a list from the output of
  		# mount for all netfs types and anything that was
  		# mounted with the _netdev option.
  		NETMOUNTS=`mount | grep '_netdev\|smbfs\|ncpfs|\coda\|nfs' \
  			| cut -d " " -f 3 | sed 's/$/ /g'`
  
  		# Check to see if anything was listed from above
  		# (see if anything is actually needs to be unmounted)
  		if [ x"$NETMOUNTS" != x ]
  		then
  			# There is something mounted
  			# terminate the echo -n above
  			echo " "
  
  			# Try and stop processes the nice way
  			# (probably won't work in most cases)
  			fuser -m -SIGTERM $NETMOUNTS > /dev/null
  
  			# Check and see if it found anything.  If it
  			# did, then give 3 seconds for things to exit
  			# the nice way before killing them off.
  			# This one will work all of the time!
  			if [ $? == 0 ]
  			then
  				sleep 3
  				fuser -km $NETMOUNTS > /dev/null
  			fi
  
  			# We now need to unmount all network filesystems.
  			# We will do this with two umount commands to allow
  			# for broken behavior of smbmount, and also to make
  			# certain that netmounts without the _netdev option
  			# will still get unmounted.
  			umount -a -O _netdev
  			# save the retval
  			if [ $? != 0 ]
  			then
  				NERRVAL=1
  			fi
  
  			# Now catch the rest of the network filesystems
  			# by fstype.  This list can be extended later as
  			# more network filesystems are supported by mount.
  			umount -a -t coda,ncpfs,nfs,smbfs
  			if [ $? == 0 ]
  			then
  				[ -z $NERRVAL ]
  				evaluate_retval
  			else
  				# make certain that we return an error
  				/bin/false              
  				evaluate_retval
  			fi
  		else
  			# There is nothing mounted
  			echo "No network volumes mounted!"
  			# print a nice '[  OK  ]' message
  			evaluate_retval
  		fi
  		;;
  
  *)
                  echo "Usage: $0 {start|stop}"
                  exit 1
                  ;;
  esac
  
  # End $rc_base/init.d/netfs
  
  
  
  1.1                  BLFS/bootscripts/blfs/init.d/nfs-client
  
  Index: nfs-client
  ===================================================================
  #!/bin/sh
  # Begin $rc_base/init.d/nfs-client
  
  # Based on sysklogd script from LFS-3.1 and earlier.
  # Rewritten by Gerard Beekmans  - gerard at linuxfromscratch.org
  
  . /etc/sysconfig/rc
  . $rc_functions
  
  case "$1" in
  	start)
  		echo "Starting NFS Client Services..."
  		loadproc /usr/sbin/rpc.statd
  		loadproc /usr/sbin/rpc.lockd
  		;;
  
  	stop)
  		echo "Stopping NFS Client Services..."
  		killproc /usr/sbin/rpc.lockd
  		killproc /usr/sbin/rpc.statd
  		;;
  
  	restart)
  		$0 stop
  		sleep 1
  		$0 start
  		;;
  
  	status)
  		statusproc /usr/sbin/rpc.statd
  		statusproc /usr/sbin/rpc.lockd
  		;;
  
  	*)
  		echo "Usage: $0 {start|stop|restart|status}"
  		exit 1
  		;;
  esac
  
  # End $rc_base/init.d/nfs-client
  
  
  
  1.1                  BLFS/bootscripts/blfs/init.d/nfs-server
  
  Index: nfs-server
  ===================================================================
  #!/bin/sh
  # Begin $rc_base/init.d/nfs-server
  
  # Based on sysklogd script from LFS-3.1 and earlier.
  # Rewritten by Gerard Beekmans  - gerard at linuxfromscratch.org
  
  . /etc/sysconfig/rc
  . $rc_functions
  
  case "$1" in
  	start)
  		echo "Starting NFS Server..."
  		loadproc /usr/sbin/rpc.mountd
  		loadproc /usr/sbin/rpc.nfsd 8
  		loadproc /usr/sbin/rpc.statd
  		;;
  
  	stop)
  		echo "Stopping NFS Server..."
  		killproc /usr/sbin/rpc.nfsd
  		killproc /usr/sbin/rpc.mountd
  		;;
  
  	reload)
  		echo "Reloading NFS Server..."
  		/usr/sbin/exportfs -ra
  		;;
  
  	restart)
  		$0 stop
  		sleep 1
  		$0 start
  		;;
  
  	status)
  		statusproc /usr/sbin/rpc.mountd
  		statusproc /usr/sbin/rpc.nfsd
  		;;
  
  	*)
  		echo "Usage: $0 {start|stop|reload|restart|status}"
  		exit 1
  		;;
  esac
  
  # End $rc_base/init.d/nfs-server
  
  
  
  1.1                  BLFS/bootscripts/blfs/init.d/ntp
  
  Index: ntp
  ===================================================================
  #!/bin/sh
  # Begin $rc_base/init.d/ntp
  
  . /etc/sysconfig/rc
  . $rc_functions
  
  case "$1" in
  	start)
  		echo "Starting ntpd..."
  		loadproc ntpd
  		;;
  
  	stop)
  		echo "Stopping ntpd..."
  		killproc ntpd
  		;;
  
  	restart)
  		$0 stop
  		sleep 1
  		$0 start
  		;;
  
  	status)
  		statusproc ntpd
  		;;
  
  	*)
  		echo "Usage: $0 {start|stop|restart|status}"
  		exit 1
  		;;
  esac
  
  # End $rc_base/init.d/ntp
  
  
  
  1.1                  BLFS/bootscripts/blfs/init.d/portmap
  
  Index: portmap
  ===================================================================
  #!/bin/sh
  # Begin $rc_base/init.d/portmap
  
  . /etc/sysconfig/rc
  . $rc_functions
  
  case "$1" in
  	start)
  		echo "Starting RPC Portmap"
  		loadproc /sbin/portmap
  		;;
  
  	stop)
  		echo "Stopping Portmap"
  		killproc /sbin/portmap
  		;;
  
  	restart)
  		$0 stop
  		sleep 1
  		$0 start
  		;;
  
  	*)
  		echo "Usage: $0 {start|stop|restart}"
  		exit 1
  		;;
  
  esac
  
  # End $rc_base/init.d/portmap
  
  
  
  1.1                  BLFS/bootscripts/blfs/init.d/postfix
  
  Index: postfix
  ===================================================================
  #!/bin/sh
  # Begin $rc_base/init.d/postfix
  
  # Based on sysklogd script from LFS-3.1 and earlier.
  # Rewritten by Gerard Beekmans  - gerard at linuxfromscratch.org
  
  . /etc/sysconfig/rc
  . $rc_functions
  
  case "$1" in
  	start)
  		echo "Starting Postfix..."
  		loadproc postfix start
  		;;
  
  	stop)
  		echo "Stopping Postfix..."
  		loadproc postfix stop
  		;;
  
  	reload)
  		echo "Reloading Postfix..."
  		loadproc postfix reload
  		;;
  
  	abort)
  		echo "Aborting Postfix..."
  		loadproc postfix abort
  		;;
  
  	flush)
  		echo "Flushing Postfix..."
  		loadproc postfix flush
  		;;
  
  	check)
  		echo "Checking Postfix..."
  		loadproc postfix check
  		;;
  
  	restart)
  		$0 stop
  		sleep 1
  		$0 start
  		;;
  
  	*)
  		echo "Usage: $0 {start|stop|reload|abort|flush|check|restart}"
  		exit 1
  		;;
  esac
  
  # End $rc_base/init.d/postfix
  
  
  
  1.1                  BLFS/bootscripts/blfs/init.d/postgresql
  
  Index: postgresql
  ===================================================================
  #!/bin/sh
  # Begin $rc_base/init.d/postgresql
  
  # Based on sysklogd script from LFS-3.1 and earlier.
  # Rewritten by Gerard Beekmans  - gerard at linuxfromscratch.org
  
  . /etc/sysconfig/rc
  . $rc_functions
  
  case "$1" in
  	start)
  		echo "Starting PostgreSQL daemon..."
  		su - postgres -c '/usr/bin/pg_ctl start -W -D /var/pgsql/data \
  				-l /var/pgsql/data/logfile -o "-i" '
  		evaluate_retval
  		;;
  
  	stop)
  		echo "Stopping PostgreSQL daemon..."
  		/usr/bin/pg_ctl stop -m smart -D /var/pgsql/data
  		evaluate_retval
  		;;
  
  	restart)
  		$0 stop
  		sleep 1
  		$0 start
  		;;
  
  	status)
  		/usr/bin/pg_ctl status -D /var/pgsql/data
  		;;
  
  	*)
  		echo "Usage: $0 {start|stop|restart|status}"
  		exit 1
  		;;
  esac
  
  # End $rc_base/init.d/postgresql
  
  
  
  1.1                  BLFS/bootscripts/blfs/init.d/proftpd
  
  Index: proftpd
  ===================================================================
  #!/bin/sh
  # Begin $rc_base/init.d/proftpd
  
  # Based on sysklogd script from LFS-3.1 and earlier.
  # Rewritten by Gerard Beekmans  - gerard at linuxfromscratch.org
  
  . /etc/sysconfig/rc
  . $rc_functions
  
  case "$1" in
  	start)
  		echo "Starting FTP Server..."
  		loadproc /usr/sbin/proftpd
  		;;
  
  	stop)
  		echo "Stopping FTP Server..."
  		killproc /usr/sbin/proftpd
  		;;
  
  	reload)
  		echo "Reloading FTP Server..."
  		reloadproc /usr/sbin/proftpd
  		;;
  
  	restart)
  		$0 stop
  		sleep 1
  		$0 start
  		;;
  
  	status)
  		statusproc /usr/sbin/proftpd
  		;;
  
  	*)
  		echo "Usage: $0 {start|stop|reload|restart|status}"
  		exit 1
  		;;
  esac
  
  # End $rc_base/init.d/proftpd
  
  
  
  1.1                  BLFS/bootscripts/blfs/init.d/random
  
  Index: random
  ===================================================================
  #!/bin/sh
  # Begin $rc_base/init.d/random
  
  # Based on sysklogd script from LFS-3.1 and earlier.
  # Rewritten by Gerard Beekmans  - gerard at linuxfromscratch.org
  # Random script elements by Larry Lawrence
  
  . /etc/sysconfig/rc
  . $rc_functions
  
  case "$1" in
  	start)
  		echo "Initializing kernel random number generator..."
  		if [ -f /var/tmp/random-seed ]; then
  			cat /var/tmp/random-seed >/dev/urandom
  		fi
  		dd if=/dev/urandom of=/var/tmp/random-seed count=1 &>/dev/null
  		evaluate_retval
  		;;
                  
  	stop)
  		echo "Saving random seed..."
  		dd if=/dev/urandom of=/var/tmp/random-seed count=1 &>/dev/null
  		evaluate_retval
  		;;
  
  	*)
  		echo "Usage: $0 {start|stop}"
  		exit 1
  		;;
  esac
  
  # End $rc_base/init.d/random
  
  
  
  1.1                  BLFS/bootscripts/blfs/init.d/rsyncd
  
  Index: rsyncd
  ===================================================================
  #!/bin/sh
  # Begin $rc_base/init.d/rsyncd
  
  # Based on sysklogd script from LFS-3.1 and earlier.
  # Rewritten by Gerard Beekmans  - gerard at linuxfromscratch.org
  
  . /etc/sysconfig/rc
  . $rc_functions
  
  case "$1" in
  	start)
  		echo "Starting RSYNC Server..."
  		loadproc /usr/bin/rsync --daemon --compress
  		;;
  
  	stop)
  		echo "Stopping RSYNC Server..."
  		killproc /usr/bin/rsync
  		;;
  
  	reload)
  		echo "Reloading RSYNC Server..."
  		reloadproc /usr/bin/rsync
  		;;
              
  	restart)
  		$0 stop
  		sleep 1
  		$0 start
  		;;
  
  	status)
  		statusproc /usr/bin/rsync
  		;;
  
  	*)
  		echo "Usage: $0 {start|stop|reload|restart|status}"
  		exit 1
  		;;
  esac
  
  # End $rc_base/init.d/rsyncd
  
  
  
  1.1                  BLFS/bootscripts/blfs/init.d/samba
  
  Index: samba
  ===================================================================
  #!/bin/sh
  # Begin $rc_base/init.d/samba
  
  # Based on sysklogd script from LFS-3.1 and earlier.
  # Rewritten by Gerard Beekmans  - gerard at linuxfromscratch.org
  
  . /etc/sysconfig/rc
  . $rc_functions
  
  case "$1" in
  	start)
  		echo "Starting nmbd..."
  		loadproc /usr/sbin/nmbd -D
  
  		echo "Starting smbd..."
  		loadproc /usr/sbin/smbd -D
  		;;
  
  	stop)
  		echo "Stopping smbd..."
  		killproc /usr/sbin/smbd
  
  		echo "Stopping nmbd..."
  		killproc /usr/sbin/nmbd
                  ;;
  
  	reload)
  		echo "Reloading smbd..."
  		reloadproc /usr/sbin/smbd
  
  		echo "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
  
  
  
  1.1                  BLFS/bootscripts/blfs/init.d/sendmail
  
  Index: sendmail
  ===================================================================
  #!/bin/sh
  # Begin $rc_base/init.d/sendmail
  
  # Based on sysklogd script from LFS-3.1 and earlier.
  # Rewritten by Gerard Beekmans  - gerard at linuxfromscratch.org
  
  . /etc/sysconfig/rc
  . $rc_functions
  
  case "$1" in
  	start)
  		echo "Starting sendmail..."
  		loadproc /usr/sbin/sendmail -bs -bd -q5m start
  		;;
  
  	stop)
  		echo "Stopping Sendmail..."
  		killproc sendmail
  		;;
  
  	status)
  		statusproc sendmail
  		;;
  
  	restart)
  		$0 stop
  		sleep 1
  		$0 start
  		;;
  
  	*)
  		echo "Usage: $0 {start|stop|status|restart}"
  		exit 1
  		;;
  esac
  
  # End $rc_base/init.d/sendmail
  
  
  
  1.1                  BLFS/bootscripts/blfs/init.d/sshd
  
  Index: sshd
  ===================================================================
  #!/bin/sh
  # Begin $rc_base/init.d/sshd
  
  # Based on sysklogd script from LFS-3.1 and earlier.
  # Rewritten by Gerard Beekmans  - gerard at linuxfromscratch.org
  
  . /etc/sysconfig/rc
  . $rc_functions
  
  case "$1" in
  	start)
  		echo "Starting SSH Server..."
  		loadproc /usr/sbin/sshd
  		;;
  
  	stop)
  		echo "Stopping SSH Server..."
  		killproc /usr/sbin/sshd
  		;;
  
  	reload)
  		echo "Reloading SSH Server..."
  		reloadproc /usr/sbin/sshd
  		;;
  
  	restart)
  		$0 stop
  		sleep 1
  		$0 start
  		;;
  
  	status)
  		statusproc /usr/sbin/sshd
  		;;
  
  	*)
  		echo "Usage: $0 {start|stop|reload|restart|status}"
  		exit 1
  		;;
  esac
  
  # End $rc_base/init.d/sshd
  
  
  
  1.1                  BLFS/bootscripts/blfs/init.d/xinetd
  
  Index: xinetd
  ===================================================================
  #!/bin/sh
  # Begin $rc_base/init.d/xinetd
  
  # Based on sysklogd script from LFS-3.1 and earlier.
  # Rewritten by Gerard Beekmans  - gerard at linuxfromscratch.org
  
  . /etc/sysconfig/rc
  . $rc_functions
  
  case "$1" in
  	start)
  		echo "Starting xinetd..."
  		loadproc /usr/sbin/xinetd
  		;;
  
  	stop)
  		echo "Stopping xinetd..."
  		killproc /usr/sbin/xinetd
  		;;
  
  	reload)
  		echo "Reloading xinetd..."
  		killall -HUP 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
  
  
  
  1.1                  BLFS/bootscripts/blfs/sysconfig/network-devices/services/dhclient
  
  Index: dhclient
  ===================================================================
  #!/bin/sh
  # Begin $network-devices/services/dhclient
                                                                                  
  # Based upon lfs-bootscripts-1.12 $network_devices/if{down,up}
  # Rewritten by Nathan Coulson <nathan at linuxfromscratch.org>
  # Adapted for dhclient by DJ Lucas <dj at lucasit.com>
  
  . /etc/sysconfig/rc
  . $rc_functions
  . $network_devices/ifconfig.$1
                                                                                  
  case "$2" in
          up)
                  echo "Bringing up the $1 interface (dhclient)..."
                  /sbin/dhclient $1 $DHCP_START
                  evaluate_retval
          ;;
                                                                                  
          down)
                  echo "Bringing down the $1 interface (dhclient)..."
                  /sbin/dhclient $1 $DHCP_STOP
                  evaluate_retval
          ;;
                                                                                  
          *)
                  echo "Usage: $0 [interface] {up|down}"
                  exit 1
          ;;
  esac
                                                                                  
  # End $network_devices/services/dhclient
  
  
  
  1.1                  BLFS/bootscripts/blfs/sysconfig/network-devices/services/dhcpcd
  
  Index: dhcpcd
  ===================================================================
  #!/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>
  
  . /etc/sysconfig/rc
  . $rc_functions
  . $network_devices/ifconfig.$1
                                                                                  
  case "$2" in
          up)
                  echo "Bringing up the $1 interface (dhcpcd)..."
                  # Test to see if there is a stale pid file
                  if [ -f /var/run/dhcpcd-$1.pid ]
                  then
                      ps $(cat /var/run/dhcpcd-$1.pid) | grep dhcpcd > /dev/null
                      if [ $? != 0 ]
                      then
                          rm -f /var/run/dhcpcd-$1.pid > /dev/null
                      else
                          print_status warning running
                          exit 2
                      fi
                  fi
                  /sbin/dhcpcd $1 $DHCP_START
                  evaluate_retval
          ;;
                                                                                  
          down)
                  echo "Bringing down the $1 interface (dhcpcd)..."
                  /sbin/dhcpcd $1 $DHCP_STOP
                  evaluate_retval
          ;;
                                                                                  
          *)
                  echo "Usage: $0 [interface] {up|down}"
                  exit 1
          ;;
  esac
                                                                                  
  # End $network_devices/services/dhcpcd
  
  
  
  1.1                  BLFS/bootscripts/blfs/sysconfig/network-devices/services/ipx
  
  Index: ipx
  ===================================================================
  #!/bin/sh
  # Begin $network-devices/services/ipx
  
  # Based upon lfs-bootscripts-1.12 $network_devices/if{down,up}
  # Rewritten by Nathan Coulson <nathan at linuxfromscratch.org>
  # Adapted for ipx by DJ Lucas <dj at lucasit.com>
  
  . /etc/sysconfig/rc || exit
  . $rc_functions || exit
  . $network_devices/ifconfig.$1
  
  case $2 in
          up)
                  echo "Setting up the IPX protocol on $IPXDEV"
                  /sbin/ifconfig $IPXDEV up > /dev/null
                  /bin/ipx_interface add $IPXDEV $FRAME &&
                  /bin/ipx_configure --auto_interface=on --auto_primary=on
                  evaluate_retval
          ;;
  
          down)
                  echo "Stopping IPX on the $IPXDEV interface..."
                  /bin/ipx_configure --auto_interface=off --auto_primary=off &&
                  /bin/ipx_interface del $IPXDEV $FRAME
                  evaluate_retval
          ;;
  
          *)
                  echo echo "Usage: $0 [interface] {up|down}"
                  exit 1
          ;;
  
  esac
  
  # End $network-devices/services/ipx
  
  
  
  1.1                  BLFS/bootscripts/blfs/sysconfig/network-devices/services/pppoe
  
  Index: pppoe
  ===================================================================
  #!/bin/sh
  # Begin $network_devices/services/pppoe
  
  # Based upon lfs-bootscripts-1.12 $network_devices/if{down,up}
  # Rewritten by Nathan Coulson <nathan at linuxfromscratch.org>
  # Adapted for pppoe by DJ Lucas <dj at lucasit.com>
  
  . /etc/sysconfig/rc
  . $rc_functions
  . $network_devices/ifconfig.$1
  
  case "$2" in
          up)
                  echo "Bringing up the ADSL interface..."
                  /usr/sbin/adsl-start
                  evaluate_retval
          ;;
  
          down)
                  echo "Bringing down the ADSL interface..."
                  /usr/sbin/adsl-stop
                  evaluate_retval
          ;;
  
          *)
                  echo "Usage: $0 {up|down}"
                  exit 1
          ;;
  esac
  
  # End $network_devices/services/pppoe
  
  
  



More information about the blfs-book mailing list