4 # description: Starts and stops the Samba wrepld daemon to provide \
5 # WINS replication services between WINS partner servers.
7 # Source function library.
8 if [ -f /etc
/init.d
/functions
] ; then
9 .
/etc
/init.d
/functions
10 elif [ -f /etc
/rc.d
/init.d
/functions
] ; then
11 .
/etc
/rc.d
/init.d
/functions
16 # Source networking configuration.
17 .
/etc
/sysconfig
/network
19 # Check that networking is up.
20 [ ${NETWORKING} = "no" ] && exit 0
22 # Check that smb.conf exists.
23 [ -f /etc
/samba
/smb.conf
] ||
exit 0
29 echo -n "Starting WINS Replication services: "
31 if [ "`grep -i 'wins partners' /etc/samba/smb.conf | egrep -v [\#\;]`" ]; then
35 echo "WINS replication is not configured in /etc/samba/smb.conf, not starting"
38 [ $RETVAL -eq 0 ] && touch /var
/lock
/subsys
/wrepld || \
43 echo -n "Shutting down WINS replication services: "
45 if [ "`grep -i 'wins partners' /etc/samba/smb.conf | egrep -v [\#\;]`" ]; then
50 [ $RETVAL -eq 0 ] && rm -f /var
/lock
/subsys
/wrepld
58 export TMPDIR
="/var/tmp"
59 echo -n "Reloading WINS replication: "
86 [ -f /var
/lock
/subsys
/wrepld
] && restart ||
:
89 echo "Usage: $0 {start|stop|restart|status|condrestart}"