]> git.pld-linux.org Git - packages/samba.git/commitdiff
smb: skip only start if wrong role, allow other commands like stop and status
authorElan Ruusamäe <glen@delfi.ee>
Thu, 16 Apr 2015 09:24:39 +0000 (12:24 +0300)
committerElan Ruusamäe <glen@delfi.ee>
Thu, 16 Apr 2015 09:24:39 +0000 (12:24 +0300)
smb.init

index a605f4911604c876784c2bc98b0262bc41a4811f..9b7f9233f35ea0672bed4f266fe470bfa4c69237 100755 (executable)
--- a/smb.init
+++ b/smb.init
@@ -37,12 +37,12 @@ fi
 export TMPDIR=/tmp
 unset TMP || :
 
-SERVER_ROLE=$(samba-tool testparm --parameter-name="server role" 2>/dev/null | tail -n1)
-if [ "$SERVER_ROLE" = "active directory domain controller" ]; then
-       exit 0
-fi
-
 start() {
+       SERVER_ROLE=$(samba-tool testparm --parameter-name="server role" 2>/dev/null | tail -n1)
+       if [ "$SERVER_ROLE" = "active directory domain controller" ]; then
+               exit 0
+       fi
+
        # Check if the service is already running?
        if [ -f /var/lock/subsys/$lockname ]; then
                msg_already_running "Samba SMB/CIFS Server"
This page took 0.190622 seconds and 4 git commands to generate.