aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xsystemd/fedora-import-state7
1 files changed, 2 insertions, 5 deletions
diff --git a/systemd/fedora-import-state b/systemd/fedora-import-state
index a853ab9c..7809ca81 100755
--- a/systemd/fedora-import-state
+++ b/systemd/fedora-import-state
@@ -1,14 +1,11 @@
#!/bin/bash
# fedora-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