Ubuntu Pastebin

Paste from xnox at Tue, 22 Aug 2017 14:31:24 +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
diff --git a/debian/changelog b/debian/changelog
index 5024266..6abd1d9 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,10 @@
+systemd (234-2ubuntu7) artful; urgency=medium
+
+  * On new installations, /etc/resolv.conf will always exist. Move it to /run
+    and replace it with the desired final symlink. LP: #1712283
+
+ -- Dimitri John Ledkov <xnox@ubuntu.com>  Tue, 22 Aug 2017 14:26:39 +0100
+
 systemd (234-2ubuntu6) artful; urgency=medium
 
   * Disable KillUserProcesses, yet again, with meson this time.
diff --git a/debian/systemd.postinst b/debian/systemd.postinst
index 44074c2..b1e36da 100644
--- a/debian/systemd.postinst
+++ b/debian/systemd.postinst
@@ -45,8 +45,12 @@ if dpkg --compare-versions "$2" lt "234-1ubuntu2~"; then
 fi
 
 # Use stub resolve.conf by default on new installs
-if [ -z "$2" ] && [ ! -e /etc/resolv.conf ]; then
-    ln -s ../run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
+if [ -z "$2" ]; then
+    mkdir -p /run/systemd/resolve
+    if [ -e /etc/resolv.conf ]; then
+            cp /etc/resolv.conf /run/systemd/resolve/stub-resolv.conf
+    fi
+    ln -snf ../run/systemd/resolve/stub-resolv.conf /etc/resolv.conf
 fi
 
 # Enable ondemand by default on new installs installs and upgrades
Download as text