From 9a04ca1e1cdf90065338b0ecb27043e63109a2cb Mon Sep 17 00:00:00 2001 From: Martin Schwenke Date: Tue, 14 Feb 2023 12:36:11 +1100 Subject: [PATCH] ctdb-scripts: Do not replace commas with spaces in "smb ports" list The list changed back to space-separated in commit 93448f4be92d4e018aaf2f9705f0351360b2ed0f, so simplify the code a little. Signed-off-by: Martin Schwenke Reviewed-by: Volker Lendecke --- ctdb/config/events/legacy/50.samba.script | 3 +-- ctdb/tests/UNIT/eventscripts/stubs/testparm | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/ctdb/config/events/legacy/50.samba.script b/ctdb/config/events/legacy/50.samba.script index 11b22abac67..44ae0a4e63b 100755 --- a/ctdb/config/events/legacy/50.samba.script +++ b/ctdb/config/events/legacy/50.samba.script @@ -123,8 +123,7 @@ list_samba_shares() list_samba_ports() { - testparm_cat --parameter-name="smb ports" | - sed -e 's@,@ @g' + testparm_cat --parameter-name="smb ports" } ########################### diff --git a/ctdb/tests/UNIT/eventscripts/stubs/testparm b/ctdb/tests/UNIT/eventscripts/stubs/testparm index 480326e63ff..0f8216ff8b3 100755 --- a/ctdb/tests/UNIT/eventscripts/stubs/testparm +++ b/ctdb/tests/UNIT/eventscripts/stubs/testparm @@ -61,7 +61,7 @@ security) exit 0 ;; smb*ports) - echo "445, 139" + echo "445 139" exit 0 ;; ?*) not_implemented "--parameter-name=$parameter" ;;