]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ctdb:events: let 50.samba.script use 'server smb transports'
authorStefan Metzmacher <metze@samba.org>
Thu, 3 Apr 2025 14:55:19 +0000 (16:55 +0200)
committerStefan Metzmacher <metze@samba.org>
Fri, 18 Apr 2025 10:17:29 +0000 (10:17 +0000)
We can't only use 'server smb transports' as in ci runs
the 'testparm' binary is from the distribution and likely
be in older Samba version.

So we still fallback to 'smb ports'.

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
ctdb/config/events/legacy/50.samba.script

index 195c9259ee8ee7ebba53347492ec501a7aac3f0e..7da0c399d5916f2e29e7b98542a55101398698e7 100755 (executable)
@@ -149,7 +149,11 @@ list_samba_shares()
 
 list_samba_ports()
 {
-       testparm_get "smb ports"
+       {
+               testparm_get "server smb transports"
+               testparm_get "smb ports"
+       # only | head -1 would cause a broken pipe for the 2nd command
+       } | head -2 | head -1
 }
 
 normalize_transports_to_tcp_ports()