From 9170aa51fd4e8336cc34db3a1aa29989a024b50c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ville=20Skytt=C3=A4?= Date: Mon, 23 Oct 2017 23:20:31 +0300 Subject: Avoid some unnecessary stat calls --- systemd/fedora-import-state | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'systemd/fedora-import-state') diff --git a/systemd/fedora-import-state b/systemd/fedora-import-state index 16447026..85bc4817 100755 --- a/systemd/fedora-import-state +++ b/systemd/fedora-import-state @@ -34,6 +34,6 @@ IFS=$IFS_backup # Run restorecon on the copied files: # =================================== -if [ -e /sys/fs/selinux/enforce -a -x /usr/sbin/restorecon ]; then +if [ -e /sys/fs/selinux/enforce ] && [ -x /usr/sbin/restorecon ]; then find . -mindepth 1 -print0 | { cd / && xargs --null restorecon -iF; } fi -- cgit v1.2.1