summaryrefslogtreecommitdiff
path: root/net-fs
diff options
context:
space:
mode:
authorDonny Davies <woodchip@gentoo.org>2001-09-09 09:19:50 +0000
committerDonny Davies <woodchip@gentoo.org>2001-09-09 09:19:50 +0000
commitbeafc426535787107db0138926245c7999d9d93b (patch)
treef39f172ec9b703bafbcd8eeb22612aea10190068 /net-fs
parentdelete old versions (diff)
downloadgentoo-2-beafc426535787107db0138926245c7999d9d93b.tar.gz
gentoo-2-beafc426535787107db0138926245c7999d9d93b.tar.bz2
gentoo-2-beafc426535787107db0138926245c7999d9d93b.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')
-rw-r--r--net-fs/samba/files/samba.rc635
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
}