diff options
author | Donny Davies <woodchip@gentoo.org> | 2001-09-09 09:19:50 +0000 |
---|---|---|
committer | Donny Davies <woodchip@gentoo.org> | 2001-09-09 09:19:50 +0000 |
commit | 05e621b01a0e040aed6ab42f8437c34b7587f88f (patch) | |
tree | 32bfce84363d4419db84ed634b7c1944a29e65c6 /net-fs/samba | |
parent | delete old versions (diff) | |
download | historical-05e621b01a0e040aed6ab42f8437c34b7587f88f.tar.gz historical-05e621b01a0e040aed6ab42f8437c34b7587f88f.tar.bz2 historical-05e621b01a0e040aed6ab42f8437c34b7587f88f.zip |
added handy checkconfig function with the ultra handy dandy pointer to the sample conf file.. and fixed some ugly typos.. removed CAPITALS.. yuck.
Diffstat (limited to 'net-fs/samba')
-rw-r--r-- | net-fs/samba/files/samba.rc6 | 35 |
1 files changed, 22 insertions, 13 deletions
diff --git a/net-fs/samba/files/samba.rc6 b/net-fs/samba/files/samba.rc6 index ae7c62c5877f..ea82199cc1d5 100644 --- a/net-fs/samba/files/samba.rc6 +++ b/net-fs/samba/files/samba.rc6 @@ -1,23 +1,32 @@ #!/sbin/runscript depend() { - need net + need net +} + +checkconfig() { + if [ ! -e /etc/smb/smb.conf ] ; then + eerror "You need an /etc/smb/smb.conf file first" + eerror "There is a sample in /usr/share/doc/samba" + return 1 + fi } start() { - ebegin "Starting SAMBA" - start-stop-daemon --start --quiet --exec /usr/sbin/nmbd - result=$? - start-stop-daemon --start --quiet --exec /usr/sbin/smbd - result=$(( $result + $? )) - eend $result + checkconfig || return 1 + ebegin "Starting samba" + start-stop-daemon --start --quiet --exec /usr/sbin/nmbd + result=$? + start-stop-daemon --start --quiet --exec /usr/sbin/smbd + result=$(( $result + $? )) + eend $result } stop() { - ebegin "Stopping $SAMBA" - start-stop-daemon --stop --quiet --exec /usr/sbin/nmbd - result=$? - start-stop-daemon --stop --quiet --exec /usr/sbin/smbd - result=$(( $result + $? )) - eend $result + ebegin "Stopping samba" + start-stop-daemon --stop --quiet --exec /usr/sbin/nmbd + result=$? + start-stop-daemon --stop --quiet --exec /usr/sbin/smbd + result=$(( $result + $? )) + eend $result } |