source: bootscripts-standard/cblfs/init.d/samba@ 2167cfe

Last change on this file since 2167cfe was 7df280d, checked in by Joe Ciccone <jciccone@…>, 17 years ago

Change /bin/sh to /bin/bash in the bootscripts because the bootscripts use bashisms. Having ash linked to sh will cause errors. Thanks to Bigdassaved for providing the diff and Copper for bring up the issue.

  • Property mode set to 100644
File size: 1.1 KB
RevLine 
[7df280d]1#!/bin/bash
[7125722]2# Begin $rc_base/init.d/samba
3
4# Based on sysklogd script from LFS-3.1 and earlier.
5# Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
6
7#$LastChangedBy: bdubbs $
8#$Date: 2005-08-01 14:29:19 -0500 (Mon, 01 Aug 2005) $
9
10. /etc/sysconfig/rc
11. $rc_functions
12
[1680407]13smbdpid=/var/run/smbd.pid
14nmbdpid=/var/run/nmbd.pid
15
[7125722]16case "$1" in
17 start)
18 boot_mesg "Starting nmbd..."
[1680407]19 loadproc -p $nmbdpid /usr/sbin/nmbd -D
[7125722]20
21 boot_mesg "Starting smbd..."
[1680407]22 loadproc -p $smbdpid /usr/sbin/smbd -D
[7125722]23 ;;
24
25 stop)
26 boot_mesg "Stopping smbd..."
[1680407]27 killproc -p $smbdpid /usr/sbin/smbd
[7125722]28
29 boot_mesg "Stopping nmbd..."
[1680407]30 killproc -p $nmbdpid /usr/sbin/nmbd
[7125722]31 ;;
32
33 reload)
34 boot_mesg "Reloading smbd..."
[1680407]35 reloadproc -p $smbdpid /usr/sbin/smbd
[7125722]36
37 boot_mesg "Reloading nmbd..."
[1680407]38 reloadproc -p $nmbdpid /usr/sbin/nmbd
[7125722]39 ;;
40
41 restart)
42 $0 stop
43 sleep 1
44 $0 start
45 ;;
46
47 status)
[1680407]48 statusproc -p $nmbdpid /usr/sbin/nmbd
49 statusproc -p $smbdpid /usr/sbin/smbd
[7125722]50 ;;
51
52 *)
53 echo "Usage: $0 {start|stop|reload|restart|status}"
54 exit 1
55 ;;
56esac
57
58# End $rc_base/init.d/samba
Note: See TracBrowser for help on using the repository browser.