From c6e94db97c7c188d2f3628879661105368b6f2c1 Mon Sep 17 00:00:00 2001 From: Lukas Nykryn Date: Tue, 23 Jun 2015 11:55:46 +0200 Subject: import-state: don't run restorecon when it does not exist --- systemd/fedora-import-state | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'systemd') diff --git a/systemd/fedora-import-state b/systemd/fedora-import-state index 7809ca81..07fd5cad 100755 --- a/systemd/fedora-import-state +++ b/systemd/fedora-import-state @@ -6,6 +6,6 @@ cd /run/initramfs/state find . -mindepth 1 -maxdepth 1 -exec cp -av -t / {} \; # run restorecon on the copied files -if [ -e /sys/fs/selinux/enforce ]; then +if [ -e /sys/fs/selinux/enforce -a -x /usr/sbin/restorecon ]; then find . -mindepth 1 -print0 | { cd / && xargs --null restorecon -i; } fi -- cgit v1.2.1