[pkg-ntp-maintainers] [pkg-ntp] 01/05: Fix systemd wrapper writing PIDFILE to /-g
Bernhard Schmidt
berni at moszumanska.debian.org
Thu Jun 1 10:09:44 UTC 2017
This is an automated email from the git hooks/post-receive script.
berni pushed a commit to branch berni-wip
in repository pkg-ntp.
commit f5b4d5cb68e786b64ee277100c74f1b1fbdcc4c1
Author: Bernhard Schmidt <berni at debian.org>
Date: Thu Jun 1 08:42:17 2017 +0200
Fix systemd wrapper writing PIDFILE to /-g
Closes: #863857
---
debian/ntp-systemd-wrapper | 5 ++++-
debian/ntp.postinst | 6 ++++++
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/debian/ntp-systemd-wrapper b/debian/ntp-systemd-wrapper
index 716b8ab..8d5d1f2 100755
--- a/debian/ntp-systemd-wrapper
+++ b/debian/ntp-systemd-wrapper
@@ -1,5 +1,8 @@
#!/bin/sh
+DAEMON=/usr/sbin/ntpd
+PIDFILE=/var/run/ntpd.pid
+
if [ -r /etc/default/ntp ]; then
. /etc/default/ntp
fi
@@ -14,5 +17,5 @@ if test "$(uname -s)" = "Linux"; then
NTPD_OPTS="$NTPD_OPTS -u $UGID"
fi
-exec /usr/sbin/ntpd -p $PIDFILE $NTPD_OPTS
+exec $DAEMON -p $PIDFILE $NTPD_OPTS
diff --git a/debian/ntp.postinst b/debian/ntp.postinst
index 6a9b1a6..5fa7120 100644
--- a/debian/ntp.postinst
+++ b/debian/ntp.postinst
@@ -22,6 +22,12 @@ if [ "$1" = "configure" ]; then
addgroup --system --quiet ntp
adduser --system --quiet --ingroup ntp --no-create-home --home /nonexistent ntp
chown -R ntp:ntp /var/lib/ntp /var/log/ntpstats
+
+ # Bug#863857, the experimental version shipped a broken systemd wrapper
+ # writing a bogus PIDFILE on the root partition
+ if [ "$2" = "1:4.2.8p10+dfsg-3+exp2" ]; then
+ rm -f /-g
+ fi
fi
installinit_error() {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ntp/pkg-ntp.git
More information about the pkg-ntp-maintainers
mailing list