mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-11-25 03:42:14 +00:00
fix(netboot): use POSIX firewalld checks in postinstall profiles
Use separate test commands under /bin/sh. Remove regular files and symlinks, including dangling links, while retaining absent entries and directories.
This commit is contained in:
@@ -42,14 +42,14 @@ fi
|
||||
#--for redhat 8 and 8.1
|
||||
#-- Need to disable firewalld, otherwise, the remoteshell script will not able to get all the SSH keys
|
||||
FIREWALLD="$installroot/etc/systemd/system/multi-user.target.wants/firewalld.service"
|
||||
if [[ -f "$FIREWALLD" || -L "$FIREWALLD" ]]
|
||||
if [ -f "$FIREWALLD" ] || [ -L "$FIREWALLD" ]
|
||||
then
|
||||
rm -f $FIREWALLD
|
||||
rm -f "$FIREWALLD"
|
||||
fi
|
||||
FIREWALLD1="$installroot/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service"
|
||||
if [[ -f "$FIREWALLD1" || -L "$FIREWALLD1" ]]
|
||||
if [ -f "$FIREWALLD1" ] || [ -L "$FIREWALLD1" ]
|
||||
then
|
||||
rm -f $FIREWALLD1
|
||||
rm -f "$FIREWALLD1"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
@@ -43,14 +43,14 @@ fi
|
||||
#--for redhat 8 and 8.1
|
||||
#-- Need to disable firewalld, otherwise, the remoteshell script will not able to get all the SSH keys
|
||||
FIREWALLD="$installroot/etc/systemd/system/multi-user.target.wants/firewalld.service"
|
||||
if [[ -f "$FIREWALLD" || -L "$FIREWALLD" ]]
|
||||
if [ -f "$FIREWALLD" ] || [ -L "$FIREWALLD" ]
|
||||
then
|
||||
rm -f $FIREWALLD
|
||||
rm -f "$FIREWALLD"
|
||||
fi
|
||||
FIREWALLD1="$installroot/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service"
|
||||
if [[ -f "$FIREWALLD1" || -L "$FIREWALLD1" ]]
|
||||
if [ -f "$FIREWALLD1" ] || [ -L "$FIREWALLD1" ]
|
||||
then
|
||||
rm -f $FIREWALLD1
|
||||
rm -f "$FIREWALLD1"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
@@ -42,14 +42,14 @@ fi
|
||||
#--for redhat 8 and 8.1
|
||||
#-- Need to disable firewalld, otherwise, the remoteshell script will not able to get all the SSH keys
|
||||
FIREWALLD="$installroot/etc/systemd/system/multi-user.target.wants/firewalld.service"
|
||||
if [[ -f "$FIREWALLD" || -L "$FIREWALLD" ]]
|
||||
if [ -f "$FIREWALLD" ] || [ -L "$FIREWALLD" ]
|
||||
then
|
||||
rm -f $FIREWALLD
|
||||
rm -f "$FIREWALLD"
|
||||
fi
|
||||
FIREWALLD1="$installroot/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service"
|
||||
if [[ -f "$FIREWALLD1" || -L "$FIREWALLD1" ]]
|
||||
if [ -f "$FIREWALLD1" ] || [ -L "$FIREWALLD1" ]
|
||||
then
|
||||
rm -f $FIREWALLD1
|
||||
rm -f "$FIREWALLD1"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
@@ -43,14 +43,14 @@ fi
|
||||
#--for redhat 8 and 8.1
|
||||
#-- Need to disable firewalld, otherwise, the remoteshell script will not able to get all the SSH keys
|
||||
FIREWALLD="$installroot/etc/systemd/system/multi-user.target.wants/firewalld.service"
|
||||
if [[ -f "$FIREWALLD" || -L "$FIREWALLD" ]]
|
||||
if [ -f "$FIREWALLD" ] || [ -L "$FIREWALLD" ]
|
||||
then
|
||||
rm -f $FIREWALLD
|
||||
rm -f "$FIREWALLD"
|
||||
fi
|
||||
FIREWALLD1="$installroot/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service"
|
||||
if [[ -f "$FIREWALLD1" || -L "$FIREWALLD1" ]]
|
||||
if [ -f "$FIREWALLD1" ] || [ -L "$FIREWALLD1" ]
|
||||
then
|
||||
rm -f $FIREWALLD1
|
||||
rm -f "$FIREWALLD1"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
@@ -42,14 +42,14 @@ fi
|
||||
#--for redhat 8 and 8.1
|
||||
#-- Need to disable firewalld, otherwise, the remoteshell script will not able to get all the SSH keys
|
||||
FIREWALLD="$installroot/etc/systemd/system/multi-user.target.wants/firewalld.service"
|
||||
if [[ -f "$FIREWALLD" || -L "$FIREWALLD" ]]
|
||||
if [ -f "$FIREWALLD" ] || [ -L "$FIREWALLD" ]
|
||||
then
|
||||
rm -f $FIREWALLD
|
||||
rm -f "$FIREWALLD"
|
||||
fi
|
||||
FIREWALLD1="$installroot/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service"
|
||||
if [[ -f "$FIREWALLD1" || -L "$FIREWALLD1" ]]
|
||||
if [ -f "$FIREWALLD1" ] || [ -L "$FIREWALLD1" ]
|
||||
then
|
||||
rm -f $FIREWALLD1
|
||||
rm -f "$FIREWALLD1"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
@@ -43,14 +43,14 @@ fi
|
||||
#--for redhat 8 and 8.1
|
||||
#-- Need to disable firewalld, otherwise, the remoteshell script will not able to get all the SSH keys
|
||||
FIREWALLD="$installroot/etc/systemd/system/multi-user.target.wants/firewalld.service"
|
||||
if [[ -f "$FIREWALLD" || -L "$FIREWALLD" ]]
|
||||
if [ -f "$FIREWALLD" ] || [ -L "$FIREWALLD" ]
|
||||
then
|
||||
rm -f $FIREWALLD
|
||||
rm -f "$FIREWALLD"
|
||||
fi
|
||||
FIREWALLD1="$installroot/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service"
|
||||
if [[ -f "$FIREWALLD1" || -L "$FIREWALLD1" ]]
|
||||
if [ -f "$FIREWALLD1" ] || [ -L "$FIREWALLD1" ]
|
||||
then
|
||||
rm -f $FIREWALLD1
|
||||
rm -f "$FIREWALLD1"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
@@ -42,14 +42,14 @@ fi
|
||||
#--for redhat 8 and 8.1
|
||||
#-- Need to disable firewalld, otherwise, the remoteshell script will not able to get all the SSH keys
|
||||
FIREWALLD="$installroot/etc/systemd/system/multi-user.target.wants/firewalld.service"
|
||||
if [[ -f "$FIREWALLD" || -L "$FIREWALLD" ]]
|
||||
if [ -f "$FIREWALLD" ] || [ -L "$FIREWALLD" ]
|
||||
then
|
||||
rm -f $FIREWALLD
|
||||
rm -f "$FIREWALLD"
|
||||
fi
|
||||
FIREWALLD1="$installroot/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service"
|
||||
if [[ -f "$FIREWALLD1" || -L "$FIREWALLD1" ]]
|
||||
if [ -f "$FIREWALLD1" ] || [ -L "$FIREWALLD1" ]
|
||||
then
|
||||
rm -f $FIREWALLD1
|
||||
rm -f "$FIREWALLD1"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
@@ -42,14 +42,14 @@ fi
|
||||
#--for redhat 8 and 8.1
|
||||
#-- Need to disable firewalld, otherwise, the remoteshell script will not able to get all the SSH keys
|
||||
FIREWALLD="$installroot/etc/systemd/system/multi-user.target.wants/firewalld.service"
|
||||
if [[ -f "$FIREWALLD" || -L "$FIREWALLD" ]]
|
||||
if [ -f "$FIREWALLD" ] || [ -L "$FIREWALLD" ]
|
||||
then
|
||||
rm -f $FIREWALLD
|
||||
rm -f "$FIREWALLD"
|
||||
fi
|
||||
FIREWALLD1="$installroot/etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service"
|
||||
if [[ -f "$FIREWALLD1" || -L "$FIREWALLD1" ]]
|
||||
if [ -f "$FIREWALLD1" ] || [ -L "$FIREWALLD1" ]
|
||||
then
|
||||
rm -f $FIREWALLD1
|
||||
rm -f "$FIREWALLD1"
|
||||
fi
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user