Ubuntu Pastebin

Paste from adconrad at Mon, 6 Apr 2015 19:40:45 +0000

Download as text
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
diff --git a/debian/changelog b/debian/changelog
index b5ac97e..ad2f2a5 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+systemd (215-15) unstable; urgency=medium
+
+  * debian/systemd.{triggers,postinst}: Trigger a systemctl daemon-reload
+    when init scripts are installed or removed (Closes: #766429, #774799)
+
+ -- Adam Conrad <adconrad@debian.org>  Mon, 06 Apr 2015 12:35:40 -0600
+
 systemd (215-14) unstable; urgency=medium
 
   [ Michael Biebl ]
diff --git a/debian/systemd.postinst b/debian/systemd.postinst
index de92c57..7a45dbf 100644
--- a/debian/systemd.postinst
+++ b/debian/systemd.postinst
@@ -12,9 +12,19 @@ _update_catalog() {
     journalctl --update-catalog || true
 }
 
-# Update Message Catalogs database in response to dpkg trigger
+# Update Message Catalogs database and reload in response to dpkg triggers
 if [ "$1" = "triggered" ]; then
-    _update_catalog
+    shift
+    for trigger in "$@"; do
+        case $trigger in
+            /usr/lib/systemd/catalog)
+                _update_catalog
+                ;;
+            /etc/init.d)
+                _systemctl daemon-reload
+                ;;
+        esac
+    done
     exit 0
 fi
 
diff --git a/debian/systemd.triggers b/debian/systemd.triggers
index 69246ec..299a3f9 100644
--- a/debian/systemd.triggers
+++ b/debian/systemd.triggers
@@ -1 +1,2 @@
 interest-noawait /usr/lib/systemd/catalog
+interest-noawait /etc/init.d
Download as text