Ubuntu Pastebin

Paste from martin at Mon, 19 Jan 2015 17:39:48 +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
49
diff -Nru ifupdown-0.7.48.1ubuntu5/debian/changelog ifupdown-0.7.48.1ubuntu6/debian/changelog
--- ifupdown-0.7.48.1ubuntu5/debian/changelog	2014-10-01 17:44:56.000000000 +0200
+++ ifupdown-0.7.48.1ubuntu6/debian/changelog	2015-01-19 17:50:20.000000000 +0100
@@ -1,3 +1,13 @@
+ifupdown (0.7.48.1ubuntu6) vivid; urgency=medium
+
+  * Add ifup-wait-all-auto.service which makes network-online.target wait for
+    all "auto" /etc/network/interfaces for up to two minutes. This provides
+    the counterpart of upstart's static-network-up signal under systemd, so
+    that network-online.target behaves as intended with statically configured
+    interfaces.
+
+ -- Martin Pitt <martin.pitt@ubuntu.com>  Mon, 19 Jan 2015 17:48:38 +0100
+
 ifupdown (0.7.48.1ubuntu5) utopic; urgency=medium
 
   * Fix broken loopback handling due to incorrect patching of the Debian
diff -Nru ifupdown-0.7.48.1ubuntu5/debian/ifupdown.ifup-wait-all-auto.service ifupdown-0.7.48.1ubuntu6/debian/ifupdown.ifup-wait-all-auto.service
--- ifupdown-0.7.48.1ubuntu5/debian/ifupdown.ifup-wait-all-auto.service	1970-01-01 01:00:00.000000000 +0100
+++ ifupdown-0.7.48.1ubuntu6/debian/ifupdown.ifup-wait-all-auto.service	2015-01-19 17:46:23.000000000 +0100
@@ -0,0 +1,14 @@
+[Unit]
+Description=Wait for all "auto" /etc/network/interfaces to be up for network-online.target
+Documentation=man:interfaces(5) man:ifup(8)
+Before=network-online.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+TimeoutStartSec=2min
+ExecStart=/bin/sh -ec '\
+  for i in $(ifquery --list --exclude lo --allow auto); do INTERFACES="$INTERFACES$i "; done; \
+  [ -n "$INTERFACES" ] || exit 0; \
+  while ! ifquery --state $INTERFACES >/dev/null; do sleep 1; done'
+
diff -Nru ifupdown-0.7.48.1ubuntu5/debian/rules ifupdown-0.7.48.1ubuntu6/debian/rules
--- ifupdown-0.7.48.1ubuntu5/debian/rules	2014-03-23 14:13:40.000000000 +0100
+++ ifupdown-0.7.48.1ubuntu6/debian/rules	2015-01-19 17:51:39.000000000 +0100
@@ -60,6 +60,10 @@
 	dh_installinit --name=network-interface-security --noscripts
 	dh_installinit --name=network-interface --noscripts
 	dh_installinit --name=networking --noscripts
+	dh_installinit --name=ifup-wait-all-auto --noscripts
+	# statically activate the above
+	mkdir -p debian/ifupdown/lib/systemd/system/network-online.target.wants
+	ln -s ../ifup-all-auto.service debian/ifupdown/lib/systemd/system/network-online.target.wants/ifup-wait-all-auto.service
 
 override_dh_installifupdown:
 	dh_installifupdown --name=upstart
Download as text