]> git.pld-linux.org Git - packages/samba.git/commitdiff
- don't try to stop nmbd or check its status if it is disabled master auto/th/samba-4.20.0-1
authorMarcin Krol <hawk@tld-linux.org>
Thu, 4 Apr 2024 19:22:41 +0000 (21:22 +0200)
committerMarcin Krol <hawk@tld-linux.org>
Thu, 4 Apr 2024 19:22:41 +0000 (21:22 +0200)
smb.init

index 9b7f9233f35ea0672bed4f266fe470bfa4c69237..ded9c305121ab444a79b3ebe84f96e7ceb1f73bf 100755 (executable)
--- a/smb.init
+++ b/smb.init
@@ -73,8 +73,11 @@ stop() {
        msg_stopping "Samba SMB/CIFS Server"
        killproc --pidfile $smbd_pidfile smbd
 
-       msg_stopping "Samba NetBIOS Name Server"
-       killproc --pidfile $nmbd_pidfile nmbd
+       NMBD_DISABLED=`testparm -s --parameter-name='disable netbios' 2>/dev/null`
+       if [ "$NMBD_DISABLED" != Yes ]; then
+               msg_stopping "Samba NetBIOS Name Server"
+               killproc --pidfile $nmbd_pidfile nmbd
+       fi
        rm -f /var/lock/subsys/$lockname >/dev/null 2>&1
 }
 
@@ -104,9 +107,12 @@ condrestart() {
 rc_status() {
        status smbd
        RETVAL=$?
-       status nmbd
-       RET=$?
-       [ $RETVAL -eq 0 ] && RETVAL=$RET
+       NMBD_DISABLED=`testparm -s --parameter-name='disable netbios' 2>/dev/null`
+       if [ "$NMBD_DISABLED" != Yes ]; then
+               status nmbd
+               RET=$?
+               [ $RETVAL -eq 0 ] && RETVAL=$RET
+       fi
 }
 
 RETVAL=0
This page took 0.409745 seconds and 4 git commands to generate.