Browse Source

Merge pull request #221 from nandra/mbe-centos-fix

RFC: mender-convert-modify: Check is selinux is configured in enforce …
revert-252-rm-only-tag-2.2.x
Lluis Campos 4 years ago
committed by GitHub
parent
commit
012ed289d5
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 13
      mender-convert-modify

13
mender-convert-modify

@ -270,6 +270,19 @@ ${boot_part_device} ${boot_part_mountpoint} auto defaults,sync
${data_part_device} /data auto ${MENDER_DATA_PART_FSTAB_OPTS} 0 0
EOF"
#
# Make sure to re-label rootfs when selinux is in enforcing mode
# e.g. CentOS8 after conversion cannot start login shell due selinux
# inspired by: https://forums.centos.org/viewtopic.php?t=48714
#
if [ -f work/rootfs/etc/selinux/config ]; then
grep -r 'SELINUX=Enforcing' work/rootfs/etc/selinux/config || true
if [ $? -eq 0 ]; then
log_info "Selinux is in enforcing mode. Enable autorelabel"
touch work/rootfs/.autorelabel
fi
fi
log_info "Performing platform specific modifications (if any)"
for hook in "${PLATFORM_MODIFY_HOOKS[@]}"; do
log_info "Running hook: $hook"

Loading…
Cancel
Save