[pkg-wpa-devel] [wpa] 01/04: Mask hostapd every time it has no valid configuration.
Andrew Shadura
andrewsh at debian.org
Thu Nov 30 10:23:15 UTC 2017
This is an automated email from the git hooks/post-receive script.
andrewsh pushed a commit to branch debian/master
in repository wpa.
commit c39d9c269c593720b9fbc3b222ed134891156a59
Author: Andrew Shadura <andrew.shadura at collabora.co.uk>
Date: Tue Nov 28 12:20:02 2017 +0100
Mask hostapd every time it has no valid configuration.
---
debian/hostapd.postinst | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/debian/hostapd.postinst b/debian/hostapd.postinst
index 9dbb625..05b771a 100755
--- a/debian/hostapd.postinst
+++ b/debian/hostapd.postinst
@@ -2,9 +2,14 @@
set -e
-if [ -x /bin/systemctl ] && [ "$1" = configure ] && [ -z "$2" ]
+if [ -x /bin/systemctl ] && [ "$1" = configure ]
then
- systemctl mask hostapd.service
+ DAEMON_CONF=
+ . /etc/default/hostapd
+ if [ -z "$DAEMON_CONF" ] && ! systemctl --quiet is-active hostapd.service
+ then
+ systemctl mask hostapd.service
+ fi
fi
#DEBHELPER#
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/collab-maint/wpa.git
More information about the Pkg-wpa-devel
mailing list