diff options
Diffstat (limited to 'data/systemd/fedora-import-state')
-rw-r--r-- | data/systemd/fedora-import-state | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/data/systemd/fedora-import-state b/data/systemd/fedora-import-state new file mode 100644 index 000000000..a853ab9cd --- /dev/null +++ b/data/systemd/fedora-import-state @@ -0,0 +1,14 @@ +#!/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 / . + +# run restorecon on the copied files +if [ -e /sys/fs/selinux/enforce ]; then + find . | ( cd /; restorecon -i -f -; ) || : +fi |