From 47044fe3b0fdc06b89c806eb2765f66a17d63ff0 Mon Sep 17 00:00:00 2001 From: Laurent Bigonville Date: Sat, 26 Jan 2013 00:19:45 +0100 Subject: [PATCH] d/p/0004-fix-systemd-service.patch: Fix systemd service file for Debian --- debian/changelog | 3 +- debian/patches/0004-fix-systemd-service.patch | 28 +++++++++++++++++++ debian/patches/series | 1 + 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 debian/patches/0004-fix-systemd-service.patch diff --git a/debian/changelog b/debian/changelog index b7eeeaa..1864def 100644 --- a/debian/changelog +++ b/debian/changelog @@ -8,6 +8,7 @@ nut (2.6.5-2) UNRELEASED; urgency=low * debian/watch: Update watch file URL (Thanks to Bart Martens) * debian/rules: Alias systemd nut-monitor service file to nut-client to prevent it from running twice + * d/p/0004-fix-systemd-service.patch: Fix systemd service file for Debian [ Sébastien Villemot ] * debian/nut-client.preinst: revert /etc/nut/nut.conf mangling done by older @@ -20,7 +21,7 @@ nut (2.6.5-2) UNRELEASED; urgency=low * Also remove /etc/init.d/nut in nut-client postinst. Thanks to Laurent Bigonville for the hint. - -- Laurent Bigonville Fri, 25 Jan 2013 23:13:51 +0100 + -- Laurent Bigonville Sat, 26 Jan 2013 00:15:43 +0100 nut (2.6.5-1) experimental; urgency=low diff --git a/debian/patches/0004-fix-systemd-service.patch b/debian/patches/0004-fix-systemd-service.patch new file mode 100644 index 0000000..9465687 --- /dev/null +++ b/debian/patches/0004-fix-systemd-service.patch @@ -0,0 +1,28 @@ +Subject: Fix systemd service file for Debian +From: Laurent Bigonville +Forwarded: not-needed + +--- a/scripts/systemd/nut-driver.service.in ++++ b/scripts/systemd/nut-driver.service.in +@@ -1,10 +1,11 @@ + [Unit] + Description=Network UPS Tools - power device driver controller +-After=local-fs.target network.target ++After=local-fs.target network.target udev-settle.service ++Wants=udev-settle.service + StopWhenUnneeded=yes + + [Service] +-ExecStart=@driverexecdir@/upsdrvctl start +-ExecStop=@driverexecdir@/upsdrvctl stop ++ExecStart=@SBINDIR@/upsdrvctl start ++ExecStop=@SBINDIR@/upsdrvctl stop + Type=forking + +--- a/scripts/systemd/nut-monitor.service.in ++++ b/scripts/systemd/nut-monitor.service.in +@@ -9,3 +9,4 @@ Type=forking + + [Install] + WantedBy=multi-user.target ++Alias=nut-client.service diff --git a/debian/patches/series b/debian/patches/series index 0b2897f..540178d 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -1,2 +1,3 @@ 0003-install-dev-files-in-usr.patch 0002-nut-monitor-paths.patch +0004-fix-systemd-service.patch