From 6b00c90d709a01822027fb9986ec8ace605dd991 Mon Sep 17 00:00:00 2001 From: "\"Steven J. Hill\"" Date: Wed, 9 May 2007 22:48:41 +0000 Subject: Rename all INIT scripts to have the numerical prefixes to easily see the start-up order. --- package/samba/S91smb | 79 ++++++++++++++++++++++++++++++++++++++++++++++++ package/samba/init-samba | 79 ------------------------------------------------ package/samba/samba.mk | 2 +- 3 files changed, 80 insertions(+), 80 deletions(-) create mode 100755 package/samba/S91smb delete mode 100755 package/samba/init-samba (limited to 'package/samba') diff --git a/package/samba/S91smb b/package/samba/S91smb new file mode 100755 index 000000000..859b54008 --- /dev/null +++ b/package/samba/S91smb @@ -0,0 +1,79 @@ +#!/bin/sh +# +# Stolen from RedHat FC5. +# + +# Check that smb.conf exists. +[ -f /etc/samba/smb.conf ] || exit 0 + +# Make directories. +mkdir -p /var/cache/samba +mkdir -p /var/log/samba + +RETVAL=0 + +start() { + echo -n "Starting SMB services: " + smbd -D + RETVAL=$? + echo "done" + + echo -n "Starting NMB services: " + nmbd -D + RETVAL2=$? + echo "done" + + [ $RETVAL -eq 0 -a $RETVAL2 -eq 0 ] && touch /var/lock/subsys/smb || \ + RETVAL=1 + return $RETVAL +} + +stop() { + echo -n "Shutting down SMB services: " + kill -9 `pidof smbd` + RETVAL=$? + rm -f /var/run/smbd.pid + echo "done" + + echo -n "Shutting down NMB services: " + kill -9 `pidof nmbd` + RETVAL2=$? + rm -f /var/run/nmbd.pid + + [ $RETVAL -eq 0 -a $RETVAL2 -eq 0 ] && rm -f /var/lock/subsys/smb + echo "done" + return $RETVAL +} + +restart() { + stop + start +} + +reload() { + echo -n "Reloading smb.conf file: " + kill -HUP `pidof smbd` + RETVAL=$? + echo "done" + return $RETVAL +} + +case "$1" in + start) + start + ;; + stop) + stop + ;; + restart) + restart + ;; + reload) + reload + ;; + *) + echo "Usage: $0 {start|stop|restart|reload}" + exit 1 +esac + +exit $? diff --git a/package/samba/init-samba b/package/samba/init-samba deleted file mode 100755 index 859b54008..000000000 --- a/package/samba/init-samba +++ /dev/null @@ -1,79 +0,0 @@ -#!/bin/sh -# -# Stolen from RedHat FC5. -# - -# Check that smb.conf exists. -[ -f /etc/samba/smb.conf ] || exit 0 - -# Make directories. -mkdir -p /var/cache/samba -mkdir -p /var/log/samba - -RETVAL=0 - -start() { - echo -n "Starting SMB services: " - smbd -D - RETVAL=$? - echo "done" - - echo -n "Starting NMB services: " - nmbd -D - RETVAL2=$? - echo "done" - - [ $RETVAL -eq 0 -a $RETVAL2 -eq 0 ] && touch /var/lock/subsys/smb || \ - RETVAL=1 - return $RETVAL -} - -stop() { - echo -n "Shutting down SMB services: " - kill -9 `pidof smbd` - RETVAL=$? - rm -f /var/run/smbd.pid - echo "done" - - echo -n "Shutting down NMB services: " - kill -9 `pidof nmbd` - RETVAL2=$? - rm -f /var/run/nmbd.pid - - [ $RETVAL -eq 0 -a $RETVAL2 -eq 0 ] && rm -f /var/lock/subsys/smb - echo "done" - return $RETVAL -} - -restart() { - stop - start -} - -reload() { - echo -n "Reloading smb.conf file: " - kill -HUP `pidof smbd` - RETVAL=$? - echo "done" - return $RETVAL -} - -case "$1" in - start) - start - ;; - stop) - stop - ;; - restart) - restart - ;; - reload) - reload - ;; - *) - echo "Usage: $0 {start|stop|restart|reload}" - exit 1 -esac - -exit $? diff --git a/package/samba/samba.mk b/package/samba/samba.mk index af8bfcd89..dd177c063 100644 --- a/package/samba/samba.mk +++ b/package/samba/samba.mk @@ -92,7 +92,7 @@ $(TARGET_DIR)/$(SAMBA_TARGET_BINARY): $(SAMBA_DIR)/$(SAMBA_BINARY) for file in $(SAMBA_TARGETS_) ; do \ rm -f $(TARGET_DIR)/$$file; \ done - $(INSTALL) -m 0755 -D package/samba/init-samba $(TARGET_DIR)/etc/init.d/S91smb + $(INSTALL) -m 0755 -D package/samba/S91smb $(TARGET_DIR)/etc/init.d @if [ ! -f $(TARGET_DIR)/etc/samba/smb.conf ] ; then \ $(INSTALL) -m 0755 -D package/samba/simple.conf $(TARGET_DIR)/etc/samba/smb.conf; \ fi; -- cgit v1.2.3