cvs commit: BLFS/bootscripts/blfs/init.d winbind

tushar at linuxfromscratch.org tushar at linuxfromscratch.org
Sat May 22 08:12:42 PDT 2004


tushar      04/05/22 09:12:42

  Modified:    bootscripts ChangeLog Makefile
  Added:       bootscripts/blfs/init.d winbind
  Log:
  Added winbind script to blfs-bootscripts
  
  Revision  Changes    Path
  1.3       +3 -0      BLFS/bootscripts/ChangeLog
  
  Index: ChangeLog
  ===================================================================
  RCS file: /home/cvsroot/BLFS/bootscripts/ChangeLog,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -u -r1.2 -r1.3
  --- ChangeLog	15 May 2004 07:03:17 -0000	1.2
  +++ ChangeLog	22 May 2004 15:12:42 -0000	1.3
  @@ -1,3 +1,6 @@
  +2004-05-22 Tushar T <tushar at linuxfromscratch.org>
  +	* Added winbind script.
  +
   2004-05-14 Tushar T <tushar at linuxfromscratch.org>
   	* Added init.d/kerberos script.
   	* Added init.d/usb script.
  
  
  
  1.3       +11 -0     BLFS/bootscripts/Makefile
  
  Index: Makefile
  ===================================================================
  RCS file: /home/cvsroot/BLFS/bootscripts/Makefile,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -u -r1.2 -r1.3
  --- Makefile	15 May 2004 07:03:17 -0000	1.2
  +++ Makefile	22 May 2004 15:12:42 -0000	1.3
  @@ -310,6 +310,16 @@
   	install -m 754 blfs/init.d/usb        ${EXTDIR}/rc.d/init.d/
   	ln -sf ../init.d/usb /etc/rc.d/rcsysinit.d/S90usb
   
  +install-winbind: create-dirs
  +	install -m 754 blfs/init.d/winbind    ${EXTDIR}/rc.d/init.d/
  +	ln -sf ../init.d/winbind /etc/rc.d/rc0.d/K49winbind
  +	ln -sf ../init.d/winbind /etc/rc.d/rc1.d/K49winbind
  +	ln -sf ../init.d/winbind /etc/rc.d/rc2.d/K49winbind
  +	ln -sf ../init.d/winbind /etc/rc.d/rc3.d/S25winbind
  +	ln -sf ../init.d/winbind /etc/rc.d/rc4.d/S25winbind
  +	ln -sf ../init.d/winbind /etc/rc.d/rc5.d/S25winbind
  +	ln -sf ../init.d/winbind /etc/rc.d/rc6.d/K49winbind
  +
   install-xinetd: create-dirs
   	install -m 754 blfs/init.d/xinetd     ${EXTDIR}/rc.d/init.d/
   	ln -sf  ../init.d/xinetd ${EXTDIR}/rc.d/rc0.d/K49xinetd
  @@ -352,4 +362,5 @@
   	install-sendmail \
   	install-sshd \
   	install-usb \
  +	install-winbind \
   	install-xinetd
  
  
  
  1.1                  BLFS/bootscripts/blfs/init.d/winbind
  
  Index: winbind
  ===================================================================
  #!/bin/bash
  # Begin $rc_base/init.d/winbind
  
  # Based on sysklogd script from LFS-3.1 and earlier.
  # Rewritten by Gerard Beekmans  - gerard at linuxfromscratch.org
  
  source /etc/sysconfig/rc
  source $rc_functions
  
  case "$1" in
  
          start)
                  echo "Starting winbind..."
                  loadproc /usr/sbin/winbindd
                  ;;
  
          stop)
                  echo "Stopping winbind..."
                  if [ -e /var/run/winbindd.pid ]
                  then
                      localpid=$(cat /var/run/winbindd.pid)
                  else
                      localpid=""
                  fi
                  if [ -n "$localpid" ]
                  then
                      i=0
                      kill -TERM $localpid 2>/dev/null
  		    sleep 3
  		    ps -A | grep $localpid 2>/dev/null
  		    if [ $?  == "0" ]
  		    then
  			while [ $i -lt 3 ]
                  	do
                              kill -0 $localpid 2>/dev/null || break
                              sleep 1
                              i=$(($i+1))
                          done
  			# if we are still running hit the fall back
  			# signal (KILL)
                          ps -A | grep $localpid 2>/dev/null
  			if [ $? == "0" ]
  			then
  			    kill -KILL $localpid 2>/dev/null
  			    sleep 3
  			    failure=1
  			fi
  		    else
  			failure=0
  			rm -f /var/run/winbindd.pid
  		    fi
                      (exit $failure)
                      evaluate_retval
                  else
                      print_status warning not_running
                  fi
                  ;;
  
  	reload)
  		echo "Reloading winbind..."
  		reloadproc winbindd
  		;;
  
          restart)
                  $0 stop
                  sleep 1
                  $0 start
                  ;;
  
          status)
                  statusproc /usr/sbin/winbindd
                  ;;
  
          *)
                  echo "Usage: $0 {start|stop|reload|restart|status}"
                  exit 1
                  ;;
  
  esac
  
  # End $rc_base/init.d/winbind
  
  
  



More information about the blfs-book mailing list