diff options
-rwxr-xr-x | systemd/rhel-import-state | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/systemd/rhel-import-state b/systemd/rhel-import-state index 90c88d53..4f2d283b 100755 --- a/systemd/rhel-import-state +++ b/systemd/rhel-import-state @@ -1,14 +1,11 @@ #!/bin/bash # rhel-import-state: import state files from initramfs (e.g. network config) -# exit early if root isn't writeable -[ -w / ] || exit 0 - # copy state into root cd /run/initramfs/state -cp -a -t / . +find . -mindepth 1 -maxdepth 1 -exec cp -av -t / {} \; # run restorecon on the copied files if [ -e /sys/fs/selinux/enforce ]; then - find . | ( cd /; restorecon -i -f -; ) || : + find . -mindepth 1 -print0 | { cd / && xargs --null restorecon -i; } fi |