From f9299098867b46674950a727fa4bb74263e92daa Mon Sep 17 00:00:00 2001 From: AuxXxilium Date: Fri, 23 Aug 2024 00:19:32 +0200 Subject: [PATCH] eudev: fix install Signed-off-by: AuxXxilium --- eudev/install.sh | 27 ++++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/eudev/install.sh b/eudev/install.sh index c5d404f..5271704 100755 --- a/eudev/install.sh +++ b/eudev/install.sh @@ -92,17 +92,22 @@ elif [ "${1}" = "late" ]; then mkdir -p "/tmpRoot/usr/lib/systemd/system" DEST="/tmpRoot/usr/lib/systemd/system/udevrules.service" - echo "[Unit]" >${DEST} - echo "Description=Reload udev rules" >>${DEST} - echo >>${DEST} - echo "[Service]" >>${DEST} - echo "Type=oneshot" >>${DEST} - echo "RemainAfterExit=yes" >>${DEST} - echo "ExecStart=/usr/bin/udevadm hwdb --update" >>${DEST} - echo "ExecStart=/usr/bin/udevadm control --reload-rules" >>${DEST} - echo >>${DEST} - echo "[Install]" >>${DEST} - echo "WantedBy=multi-user.target" >>${DEST} + cat << EOF > ${DEST} +[Unit] +Description=Reload udev rules + +[Service] +Type=oneshot +RemainAfterExit=yes +ExecStart=/usr/bin/udevadm hwdb --update +ExecStart=/usr/bin/udevadm control --reload-rules + +[Install] +WantedBy=multi-user.target + +[X-Synology] +Author=Virtualization Team +EOF mkdir -vp /tmpRoot/usr/lib/systemd/system/multi-user.target.wants ln -vsf /usr/lib/systemd/system/udevrules.service /tmpRoot/usr/lib/systemd/system/multi-user.target.wants/udevrules.service