From c122bc404c4560a323cd6413de45ea9711a873a1 Mon Sep 17 00:00:00 2001 From: Lin Liu Date: Tue, 29 Oct 2024 04:20:18 +0000 Subject: [PATCH] CP-50546: Remove initscripts family initscripts family are legacy and want to be removed `service iptables save` call /usr/libexec/initscripts/legacy-actions/iptables/save, which call `exec /usr/libexec/iptables/iptables.init save`, to save iptables rules and remove initscripts, we call following directly `/usr/libexec/iptables/iptables.init save` `service` command are also updated to `systemctl` Signed-off-by: Lin Liu --- scripts/plugins/firewall-port | 4 ++-- scripts/xe-syslog-reconfigure | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/plugins/firewall-port b/scripts/plugins/firewall-port index 820a0608d94..b06707dbd28 100644 --- a/scripts/plugins/firewall-port +++ b/scripts/plugins/firewall-port @@ -37,14 +37,14 @@ case "${OP}" in iptables -I INPUT -j "${CHAIN}" fi # asuume chain is used if it exists iptables -I "${CHAIN}" $RULE - service iptables save + /usr/libexec/iptables/iptables.init save fi ;; close) if iptables -C $CHAIN $RULE 2>/dev/null then # close port if it was opened iptables -D $CHAIN $RULE - service iptables save + /usr/libexec/iptables/iptables.init save fi ;; check) diff --git a/scripts/xe-syslog-reconfigure b/scripts/xe-syslog-reconfigure index f9e7d3bd649..cc64a303044 100644 --- a/scripts/xe-syslog-reconfigure +++ b/scripts/xe-syslog-reconfigure @@ -42,4 +42,4 @@ else fi [ -s /etc/syslog.$$ ] && mv -f /etc/syslog.$$ $conf_file -service $service restart +systemctl restart $service