diff options
author | Will Woods <wwoods@redhat.com> | 2012-03-08 14:53:28 -0500 |
---|---|---|
committer | Will Woods <wwoods@redhat.com> | 2012-03-16 12:36:58 -0400 |
commit | 60a19cd66cb8147175872b4b3ac8e1eaf2ea0076 (patch) | |
tree | f999169cb0ccdcfdb3069f16df65c43c234a8e2d /data | |
parent | 498a5c932d3f6d9dfcc8ce7ea2c20c3993066155 (diff) | |
download | anaconda-60a19cd66cb8147175872b4b3ac8e1eaf2ea0076.tar.gz anaconda-60a19cd66cb8147175872b4b3ac8e1eaf2ea0076.tar.xz anaconda-60a19cd66cb8147175872b4b3ac8e1eaf2ea0076.zip |
a couple small cleanups/fixes for fedora-import-state.service
Diffstat (limited to 'data')
-rwxr-xr-x | data/systemd/fedora-import-state | 8 | ||||
-rw-r--r-- | data/systemd/fedora-import-state.service | 1 |
2 files changed, 7 insertions, 2 deletions
diff --git a/data/systemd/fedora-import-state b/data/systemd/fedora-import-state index 7979e2446..a853ab9cd 100755 --- a/data/systemd/fedora-import-state +++ b/data/systemd/fedora-import-state @@ -1,8 +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 / . || exit 1 +cp -a -t / . + +# run restorecon on the copied files if [ -e /sys/fs/selinux/enforce ]; then find . | ( cd /; restorecon -i -f -; ) || : fi diff --git a/data/systemd/fedora-import-state.service b/data/systemd/fedora-import-state.service index 4d403a44e..5294fe172 100644 --- a/data/systemd/fedora-import-state.service +++ b/data/systemd/fedora-import-state.service @@ -11,4 +11,3 @@ ExecStart=/lib/systemd/fedora-import-state Type=oneshot TimeoutSec=0 RemainAfterExit=yes - |