Revert "prepare-root.sh: don't switch selinux enforcing mode"
This reverts commit 522a302ef4
.
This commit is contained in:
parent
522a302ef4
commit
9d3bae766e
|
@ -120,6 +120,7 @@ VERSION_ID="${RELEASEVER}.$(date -u +'%Y%m%d%H%M%S')"
|
||||||
OUTDIR=${OUTDIR:-"${CURDIR}/${NAME}-${VERSION_ID}"}
|
OUTDIR=${OUTDIR:-"${CURDIR}/${NAME}-${VERSION_ID}"}
|
||||||
GPGKEY=${GPGKEY:-${NAME}.gpg}
|
GPGKEY=${GPGKEY:-${NAME}.gpg}
|
||||||
REPOSD=${REPOSD:-/etc/yum.repos.d}
|
REPOSD=${REPOSD:-/etc/yum.repos.d}
|
||||||
|
readonly OLD_SELINUX=$(getenforce)
|
||||||
|
|
||||||
[[ $TMPDIR ]] || TMPDIR=/var/tmp
|
[[ $TMPDIR ]] || TMPDIR=/var/tmp
|
||||||
readonly TMPDIR="$(realpath -e "$TMPDIR")"
|
readonly TMPDIR="$(realpath -e "$TMPDIR")"
|
||||||
|
@ -142,12 +143,15 @@ trap '
|
||||||
[[ -d "$i" ]] && mountpoint -q "$i" && umount "$i"
|
[[ -d "$i" ]] && mountpoint -q "$i" && umount "$i"
|
||||||
done
|
done
|
||||||
[[ $MY_TMPDIR ]] && rm -rf --one-file-system -- "$MY_TMPDIR"
|
[[ $MY_TMPDIR ]] && rm -rf --one-file-system -- "$MY_TMPDIR"
|
||||||
|
setenforce $OLD_SELINUX
|
||||||
exit $ret;
|
exit $ret;
|
||||||
' EXIT
|
' EXIT
|
||||||
|
|
||||||
# clean up after ourselves no matter how we die.
|
# clean up after ourselves no matter how we die.
|
||||||
trap 'exit 1;' SIGINT
|
trap 'exit 1;' SIGINT
|
||||||
|
|
||||||
|
setenforce 0
|
||||||
|
|
||||||
if ! [[ -f "${BASEDIR}"/linuxx64.efi.stub ]]; then
|
if ! [[ -f "${BASEDIR}"/linuxx64.efi.stub ]]; then
|
||||||
cp /lib/systemd/boot/efi/linuxx64.efi.stub "${BASEDIR}"/linuxx64.efi.stub
|
cp /lib/systemd/boot/efi/linuxx64.efi.stub "${BASEDIR}"/linuxx64.efi.stub
|
||||||
fi
|
fi
|
||||||
|
@ -597,4 +601,5 @@ cat > "${OUTDIR%/*}/${NAME}-latest.json" <<EOF
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
chown "$USER" "${OUTDIR%/*}/${NAME}-latest.json"
|
chown "$USER" "${OUTDIR%/*}/${NAME}-latest.json"
|
||||||
|
setenforce $OLD_SELINUX
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue