summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPeter Hutterer <peter.hutterer@who-t.net>2017-06-23 09:35:27 +1000
committerPeter Hutterer <peter.hutterer@who-t.net>2017-06-23 09:58:42 +1000
commitec27aa3a78c549a78f97bab180e65ddbc23822c6 (patch)
tree5a189c260ba38fcc438c9104e85a4a2073a343bf /src
parent8728b5b38f4999b79c3ed954e5f584e48e784902 (diff)
Skip restorecon if it cannot be found
https://bugs.freedesktop.org/show_bug.cgi?id=101557 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
Diffstat (limited to 'src')
-rw-r--r--src/libinput-restore-selinux-context.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/libinput-restore-selinux-context.sh b/src/libinput-restore-selinux-context.sh
index 7fd8fad..3b1c555 100644
--- a/src/libinput-restore-selinux-context.sh
+++ b/src/libinput-restore-selinux-context.sh
@@ -6,5 +6,7 @@
libdir="$1"
sofile=$(basename "$2")
-echo "Restoring SELinux context on $MESON_INSTALL_DESTDIR_PREFIX/$libdir/$sofile"
-restorecon "$MESON_INSTALL_DESTDIR_PREFIX/$libdir/$sofile"
+if command -v restorecon >/dev/null; then
+ echo "Restoring SELinux context on $MESON_INSTALL_DESTDIR_PREFIX/$libdir/$sofile"
+ restorecon "$MESON_INSTALL_DESTDIR_PREFIX/$libdir/$sofile"
+fi