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

Last change on this file since e799fad was 1680407, checked in by Jim Gifford <clfs@…>, 17 years ago

Added Netboot Scripts

  • Property mode set to 100644
File size: 1.0 KB
Line 
1#!/bin/sh
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
13smbdpid=/var/run/smbd.pid
14nmbdpid=/var/run/nmbd.pid
15
16case "$1" in
17 start)
18 boot_mesg "Starting nmbd..."
19 loadproc -p $nmbdpid /usr/sbin/nmbd -D
20
21 boot_mesg "Starting smbd..."
22 loadproc -p $smbdpid /usr/sbin/smbd -D
23 ;;
24
25 stop)
26 boot_mesg "Stopping smbd..."
27 killproc -p $smbdpid /usr/sbin/smbd
28
29 boot_mesg "Stopping nmbd..."
30 killproc -p $nmbdpid /usr/sbin/nmbd
31 ;;
32
33 reload)
34 boot_mesg "Reloading smbd..."
35 reloadproc -p $smbdpid /usr/sbin/smbd
36
37 boot_mesg "Reloading nmbd..."
38 reloadproc -p $nmbdpid /usr/sbin/nmbd
39 ;;
40
41 restart)
42 $0 stop
43 sleep 1
44 $0 start
45 ;;
46
47 status)
48 statusproc -p $nmbdpid /usr/sbin/nmbd
49 statusproc -p $smbdpid /usr/sbin/smbd
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.