Last change
on this file since 743075d was 1680407, checked in by Jim Gifford <clfs@…>, 17 years ago |
Added Netboot Scripts
|
-
Property mode
set to
100644
|
File size:
1.0 KB
|
Rev | Line | |
---|
[7125722] | 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 |
|
---|
[1680407] | 13 | smbdpid=/var/run/smbd.pid
|
---|
| 14 | nmbdpid=/var/run/nmbd.pid
|
---|
| 15 |
|
---|
[7125722] | 16 | case "$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 | ;;
|
---|
| 56 | esac
|
---|
| 57 |
|
---|
| 58 | # End $rc_base/init.d/samba
|
---|
Note:
See
TracBrowser
for help on using the repository browser.