Skip to content
This repository has been archived by the owner on Dec 31, 2021. It is now read-only.

Commit

Permalink
improve: remove match detection from centos.sh
Browse files Browse the repository at this point in the history
This detection only hinders progress. It means that every new possible
RedHat based OS will require an addition here. Instead, we can simply
remove this since at best case it echos, every other case it halts
progress.

Signed-off-by: Dustin Miller <dustin@packet.com>
  • Loading branch information
Dustin Miller committed Oct 15, 2021
1 parent 6cf3c2a commit a23395e
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions docker/scripts/centos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,6 @@ DVER=$2
echo "#### Detected OS on mounted target $TARGET"
echo "OS: $DOS ARCH: $arch VER: $DVER"

# Match detected OS to known OS config
if [[ $DOS == "CentOS" ]] || [[ $DOS == "RedHatEnterpriseServer" ]] || [[ $DOS == "RedHatEnterprise" ]] || [[ $DOS == "openSUSEproject" ]]; then
echo "Configuring Redhat based distro extras"
else
echo "Error: Detected OS $DOS not matched"
exit 1
fi

if [[ -f "$TARGET/etc/sysconfig/selinux" ]] && [[ $DOS != "RedHatEnterpriseServer" ]]; then
echo "Disabling SELinux"
sed -i --follow-symlinks 's/SELINUX=enforcing/SELINUX=disabled/g' "$TARGET/etc/sysconfig/selinux"
Expand Down

0 comments on commit a23395e

Please sign in to comment.