2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-30 09:36:41 +00:00

Merge pull request #7056 from gurevichmark/firewall_link

Better test when removing firewalld service files
This commit is contained in:
besawn 2021-10-28 15:02:10 -04:00 committed by GitHub
commit 5d550f60fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 8 deletions

View File

@ -42,13 +42,15 @@ fi
#--for redhat 8 and 8.1
#-- Need to disable firewalld, otherwise, the remoteshell script will not able to get all the SSH keys
if [ -f "$installroot/etc/systemd/system/multi-user.target.wants/firewalld.service" ]
FIREWALLD="$installroot/etc/systemd/system/multi-user.target.wants/firewalld.service"
if [[ -f "$FIREWALLD" || -L "$FIREWALLD" ]]
then
rm -rf $installroot/etc/systemd/system/multi-user.target.wants/firewalld.service
rm -f $FIREWALLD
fi
if [ -f "$installroot/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service" ]
FIREWALLD1="$installroot/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service"
if [[ -f "$FIREWALLD1" || -L "$FIREWALLD1" ]]
then
rm -rf $installroot/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service
rm -f $FIREWALLD1
fi

View File

@ -41,13 +41,15 @@ then
fi
#--for redhat 8 and 8.1
#-- Need to disable firewalld, otherwise, the remoteshell script will not able to get all the SSH keys
if [ -f "$installroot/etc/systemd/system/multi-user.target.wants/firewalld.service" ]
FIREWALLD="$installroot/etc/systemd/system/multi-user.target.wants/firewalld.service"
if [[ -f "$FIREWALLD" || -L "$FIREWALLD" ]]
then
rm -rf $installroot/etc/systemd/system/multi-user.target.wants/firewalld.service
rm -f $FIREWALLD
fi
if [ -f "$installroot/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service" ]
FIREWALLD1="$installroot/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service"
if [[ -f "$FIREWALLD1" || -L "$FIREWALLD1" ]]
then
rm -rf $installroot/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service
rm -f $FIREWALLD1
fi