aboutsummaryrefslogtreecommitdiffstats
path: root/systemd
diff options
context:
space:
mode:
authorVille Skyttä <ville.skytta@iki.fi>2017-10-23 23:20:31 +0300
committerDee'Kej <deekej@linuxmail.org>2017-10-30 17:05:05 +0100
commit9170aa51fd4e8336cc34db3a1aa29989a024b50c (patch)
treec2aa704e664034cd5f80f3a943c10e64b9386d66 /systemd
parent5829c811dd082ac046846bb932d9d14fbc777c17 (diff)
downloadinitscripts-9170aa51fd4e8336cc34db3a1aa29989a024b50c.tar
initscripts-9170aa51fd4e8336cc34db3a1aa29989a024b50c.tar.gz
initscripts-9170aa51fd4e8336cc34db3a1aa29989a024b50c.tar.bz2
initscripts-9170aa51fd4e8336cc34db3a1aa29989a024b50c.tar.xz
initscripts-9170aa51fd4e8336cc34db3a1aa29989a024b50c.zip
Avoid some unnecessary stat calls
Diffstat (limited to 'systemd')
-rwxr-xr-xsystemd/fedora-domainname2
-rwxr-xr-xsystemd/fedora-import-state2
2 files changed, 2 insertions, 2 deletions
diff --git a/systemd/fedora-domainname b/systemd/fedora-domainname
index 17f8ea8c..5c934584 100755
--- a/systemd/fedora-domainname
+++ b/systemd/fedora-domainname
@@ -1,7 +1,7 @@
#!/usr/bin/bash
. /etc/sysconfig/network
-if [ -n "${NISDOMAIN}" -a -x /usr/bin/domainname ]; then
+if [ -n "${NISDOMAIN}" ] && [ -x /usr/bin/domainname ]; then
domainname ${NISDOMAIN}
exit $?
fi
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