diff --git a/xCAT-server/share/xcat/netboot/rh/compute.rhels8.ppc64le.postinstall b/xCAT-server/share/xcat/netboot/rh/compute.rhels8.ppc64le.postinstall index 545ec8435..dd2576c8f 100755 --- a/xCAT-server/share/xcat/netboot/rh/compute.rhels8.ppc64le.postinstall +++ b/xCAT-server/share/xcat/netboot/rh/compute.rhels8.ppc64le.postinstall @@ -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 diff --git a/xCAT-server/share/xcat/netboot/rh/compute.rhels8.x86_64.postinstall b/xCAT-server/share/xcat/netboot/rh/compute.rhels8.x86_64.postinstall index e6728e1a7..2ad53bb40 100755 --- a/xCAT-server/share/xcat/netboot/rh/compute.rhels8.x86_64.postinstall +++ b/xCAT-server/share/xcat/netboot/rh/compute.rhels8.x86_64.postinstall @@ -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