Pose a warning for selinux, but don't exit
This commit is contained in:
parent
5454ef7c86
commit
b8ace1a10a
@ -6,6 +6,8 @@
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
|
||||
YELLOW=$(tput setaf 3)
|
||||
NORMAL=$(tput sgr0)
|
||||
SCRNAME="$(basename "$0")"
|
||||
SCRDIR="$(dirname "${BASH_SOURCE[0]}")"
|
||||
|
||||
@ -53,8 +55,8 @@ fi
|
||||
if [ -e "/sys/fs/selinux/enforce" ]; then
|
||||
enforce_check="$(cat /sys/fs/selinux/enforce)"
|
||||
if [ "$enforce_check" -eq "1" ]; then
|
||||
echo "Running with selinux enforcing is not recommended."
|
||||
exit 22
|
||||
printf "${YELLOW}WARNING:${NORMAL} Running with selinux enforcing may cause issues with the final image.\n"
|
||||
printf "Proceed at your own risk.\n"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -6,6 +6,8 @@
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
|
||||
YELLOW=$(tput setaf 3)
|
||||
NORMAL=$(tput sgr0)
|
||||
SCRNAME="$(basename "$0")"
|
||||
SCRDIR="$(dirname "${BASH_SOURCE[0]}")"
|
||||
|
||||
@ -53,8 +55,8 @@ fi
|
||||
if [ -e "/sys/fs/selinux/enforce" ]; then
|
||||
enforce_check="$(cat /sys/fs/selinux/enforce)"
|
||||
if [ "$enforce_check" -eq "1" ]; then
|
||||
echo "Running with selinux enforcing is not recommended."
|
||||
exit 22
|
||||
printf "${YELLOW}WARNING:${NORMAL} Running with selinux enforcing may cause issues with the final image.\n"
|
||||
printf "Proceed at your own risk.\n"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -6,6 +6,8 @@
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
|
||||
YELLOW=$(tput setaf 3)
|
||||
NORMAL=$(tput sgr0)
|
||||
SCRNAME="$(basename "$0")"
|
||||
SCRDIR="$(dirname "${BASH_SOURCE[0]}")"
|
||||
|
||||
@ -55,8 +57,8 @@ fi
|
||||
if [ -e "/sys/fs/selinux/enforce" ]; then
|
||||
enforce_check="$(cat /sys/fs/selinux/enforce)"
|
||||
if [ "$enforce_check" -eq "1" ]; then
|
||||
echo "Running with selinux enforcing is not recommended."
|
||||
exit 22
|
||||
printf "${YELLOW}WARNING:${NORMAL} Running with selinux enforcing may cause issues with the final image.\n"
|
||||
printf "Proceed at your own risk.\n"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -6,6 +6,8 @@
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
|
||||
YELLOW=$(tput setaf 3)
|
||||
NORMAL=$(tput sgr0)
|
||||
SCRNAME="$(basename "$0")"
|
||||
SCRDIR="$(dirname "${BASH_SOURCE[0]}")"
|
||||
|
||||
@ -53,8 +55,8 @@ fi
|
||||
if [ -e "/sys/fs/selinux/enforce" ]; then
|
||||
enforce_check="$(cat /sys/fs/selinux/enforce)"
|
||||
if [ "$enforce_check" -eq "1" ]; then
|
||||
echo "Running with selinux enforcing is not recommended."
|
||||
exit 22
|
||||
printf "${YELLOW}WARNING:${NORMAL} Running with selinux enforcing may cause issues with the final image.\n"
|
||||
printf "Proceed at your own risk.\n"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
@ -6,6 +6,8 @@
|
||||
set -o errexit
|
||||
set -o pipefail
|
||||
|
||||
YELLOW=$(tput setaf 3)
|
||||
NORMAL=$(tput sgr0)
|
||||
SCRNAME="$(basename "$0")"
|
||||
SCRDIR="$(dirname "${BASH_SOURCE[0]}")"
|
||||
|
||||
@ -53,8 +55,8 @@ fi
|
||||
if [ -e "/sys/fs/selinux/enforce" ]; then
|
||||
enforce_check="$(cat /sys/fs/selinux/enforce)"
|
||||
if [ "$enforce_check" -eq "1" ]; then
|
||||
echo "Running with selinux enforcing is not recommended."
|
||||
exit 22
|
||||
printf "${YELLOW}WARNING:${NORMAL} Running with selinux enforcing may cause issues with the final image.\n"
|
||||
printf "Proceed at your own risk.\n"
|
||||
fi
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user