]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
nicer use of testparm
authorAndrew Tridgell <tridge@samba.org>
Thu, 13 Sep 2007 23:24:34 +0000 (09:24 +1000)
committerAndrew Tridgell <tridge@samba.org>
Thu, 13 Sep 2007 23:24:34 +0000 (09:24 +1000)
(This used to be ctdb commit a611ea930fb9dae6e56f6a74b2bdc9e08066d4d1)

ctdb/config/events.d/50.samba

index a833cb620662a11383e773222d89c4fd554599d5..04aeaa3c74539ff9e6dd34c165b32e997326a2f9 100755 (executable)
@@ -50,7 +50,7 @@ case $cmd in
        nice service smb start
 
        # wait for the Samba tcp ports to become available
-       smb_ports=`testparm -sv 2> /dev/null | egrep '\s*smb ports =' | cut -d= -f2`
+       smb_ports=`testparm -s --parameter-name="smb ports" 2> /dev/null`
        ctdb_wait_tcp_ports "Samba" $smb_ports
 
        # wait for winbind to be ready
@@ -96,7 +96,7 @@ case $cmd in
        smb_dirs=`testparm -s 2> /dev/null | egrep '^\s*path = '  | cut -d= -f2`
        ctdb_check_directories "Samba" $smb_dirs        
 
-       smb_ports=`testparm -sv 2> /dev/null | egrep '\s*smb ports =' | cut -d= -f2`
+       smb_ports=`testparm -s --parameter-name="smb ports" 2> /dev/null`
        ctdb_check_tcp_ports "Samba" $smb_ports
 
        # check winbind is OK