#!/bin/sh
#
-# chkconfig: - 91 35
+# chkconfig: 35 91 9
# description: Starts and stops the Samba smbd and nmbd daemons \
# used to provide SMB network services.
start() {
+ # If CUPS is used as printing system, reload smb after a 1 minute delay
+ # to allow the printers to appear properly as samba shares.
+ if killall -0 cupsd 2>/dev/null; then
+ ( sleep 60 && killproc smbd -HUP 1>/dev/null) &
+ fi
+ export TMPDIR="/var/tmp"
echo -n "Starting SMB services: "
daemon smbd -D
RETVAL=$?
start
}
reload() {
+ export TMPDIR="/var/tmp"
echo -n "Reloading smb.conf file: "
killproc smbd -HUP
RETVAL=$?