From 4264b5d65c012fdbe4e2b676ef1987ab4a0778dd Mon Sep 17 00:00:00 2001
From: Alec Leamas <leamas.alec@gmail.com>
Date: Sat, 4 Feb 2017 10:56:21 +0100
Subject: [PATCH 12/14] build: cmake: Use correct permissions when installing.
---
software/usb_ir/CMakeLists.txt | 2 ++
software/usb_ir/files/systemd/usr/bin/iguanaIR-rescan | 12 ++++++------
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git a/software/usb_ir/CMakeLists.txt b/software/usb_ir/CMakeLists.txt
index 8a55372..665ae82 100644
--- a/software/usb_ir/CMakeLists.txt
+++ b/software/usb_ir/CMakeLists.txt
@@ -245,9 +245,11 @@ install(FILES iguanaIR.h
DESTINATION /usr/include)
if (${SYSTEMD_FOUND} EQUAL 1)
install(DIRECTORY files/systemd/usr
+ USE_SOURCE_PERMISSIONS
DESTINATION /)
else()
install(DIRECTORY files/sysV/usr files/sysV/etc
+ USE_SOURCE_PERMISSIONS
DESTINATION /)
endif()
diff --git a/software/usb_ir/files/systemd/usr/bin/iguanaIR-rescan b/software/usb_ir/files/systemd/usr/bin/iguanaIR-rescan
index a41a59d..9d0a700 100755
--- a/software/usb_ir/files/systemd/usr/bin/iguanaIR-rescan
+++ b/software/usb_ir/files/systemd/usr/bin/iguanaIR-rescan
@@ -4,11 +4,11 @@
# signal fails, restart daemon.
if systemctl --quiet is-active iguanaIR.service; then
- pid=$( systemctl --property=MainPID show iguanaIR.service ) || \
- pid=''
- pid=${pid##*=}
- [ -n "$pid" ] && kill -HUP $pid &>/dev/null && exit 0
+ pid=$( systemctl --property=MainPID show iguanaIR.service ) || \
+ pid=''
+ pid=${pid##*=}
+ [ -n "$pid" ] && kill -HUP $pid &>/dev/null && exit 0
fi
systemctl show --property=UnitFileState iguanaIR.service |
- grep -q enabled && \
- systemctl restart iguanaIR.service
+ grep -q enabled && \
+ systemctl restart iguanaIR.service
--
2.9.3