mirror of
https://github.com/topjohnwu/selinux.git
synced 2024-12-14 06:58:44 +00:00
policycoreutils: fixfiles: failure to create /.autorelabel is fatal
Fix the following ambiguous output (from booting with init=/bin/sh): # /usr/sbin/fixfiles onboot /usr/sbin/fixfiles: line 313: /.autorelabel: Read-only file system /usr/sbin/fixfiles: line 317: /.autorelabel: Read-only file system System will relabel on next boot System will not relabel on next boot if we couldn't create ./autorelabel (In case anyone reading this description is still confused: To run `fixfiles onboot` after booting with init=/bin/sh, you must first run `mount / -oremount,rw`).
This commit is contained in:
parent
20c9b4971e
commit
5ddfc0371a
@ -309,7 +309,7 @@ case "$1" in
|
||||
usage
|
||||
exit 1
|
||||
fi
|
||||
> /.autorelabel
|
||||
> /.autorelabel || exit $?
|
||||
[ -z "$FORCEFLAG" ] || echo -n "$FORCEFLAG " >> /.autorelabel
|
||||
[ -z "$BOOTTIME" ] || echo -N $BOOTTIME >> /.autorelabel
|
||||
# Force full relabel if / does not have a label on it
|
||||
|
Loading…
Reference in New Issue
Block a user