Merge lp:~lamont/cloud-initramfs-tools/0.29ubuntu1.1 into lp:cloud-initramfs-tools

Proposed by LaMont Jones
Status: Merged
Merged at revision: 117
Proposed branch: lp:~lamont/cloud-initramfs-tools/0.29ubuntu1.1
Merge into: lp:cloud-initramfs-tools
Diff against target: 60 lines (+27/-5)
2 files modified
debian/changelog (+6/-0)
dyn-netconf/scripts/init-bottom/cloud-initramfs-dyn-netconf (+21/-5)
To merge this branch: bzr merge lp:~lamont/cloud-initramfs-tools/0.29ubuntu1.1
Reviewer Review Type Date Requested Status
cloud-initramfs-tools Pending
Review via email: mp+306980@code.launchpad.net

Commit message

Adds IPv6 support to the creation of /run/network/dynamic-interfaces.

Description of the change

Adds IPv6 support to the creation of /run/network/dynamic-interfaces.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2016-09-23 21:00:44 +0000
3+++ debian/changelog 2016-09-28 03:54:56 +0000
4@@ -1,3 +1,9 @@
5+cloud-initramfs-tools (0.29ubuntu1.1) yakkety; urgency=medium
6+
7+ * Add IPV6 support to cloud-initramfs-dyn-netconf. (LP: #1621615)
8+
9+ -- LaMont Jones <lamont@canonical.com> Tue, 27 Sep 2016 16:07:48 -0600
10+
11 cloud-initramfs-tools (0.29ubuntu1) yakkety; urgency=medium
12
13 * overlayroot: support 'overlay' filesystem explicitly rather than
14
15=== modified file 'dyn-netconf/scripts/init-bottom/cloud-initramfs-dyn-netconf'
16--- dyn-netconf/scripts/init-bottom/cloud-initramfs-dyn-netconf 2015-06-19 17:16:06 +0000
17+++ dyn-netconf/scripts/init-bottom/cloud-initramfs-dyn-netconf 2016-09-28 03:54:56 +0000
18@@ -77,6 +77,8 @@
19
20 DEVICE=""; PROTO=""; IPV4ADDR=""; IPV4NETMASK=""; IPV4GATEWAY="";
21 IPV4DNS0=""; IPV4DNS1=""; DNSDOMAIN=""; DOMAINSEARCH=""; filename="";
22+ IPV4PROTO=""; IPV6PROTO=""; IPV6ADDR=""; IPV6NETMASK="";
23+ IPV6GATEWAY=""; IPV6DNS0=""; IPV6DNS1=""; IPV6DOMAINSEARCH="";
24 . "$f"
25
26 if [ -z "$DEVICE" ]; then
27@@ -101,14 +103,28 @@
28 [ -n "$IPV4NETMASK" ] && printf "\t%s\n" "netmask $IPV4NETMASK"
29 [ -n "$IPV4GATEWAY" ] && printf "\t%s\n" "gateway $IPV4GATEWAY"
30 fi
31+ if [ "$IPV6PROTO" = "dhcp" ]; then
32+ echo "iface $DEVICE inet6 dhcp"
33+ elif [ "$IPV6PROTO" = "static" ]; then
34+ echo "iface $DEVICE inet6 static"
35+ [ -n "$IPV6ADDR" ] && printf "\t%s\n" "address $IPV6ADDR"
36+ [ -n "$IPV6NETMASK" ] && printf "\t%s\n" "netmask $IPV6NETMASK"
37+ [ -n "$IPV6GATEWAY" ] && printf "\t%s\n" "gateway $IPV6GATEWAY"
38+ fi
39 if [ -n "$IPV4DNS0" -a "$IPV4DNS0" != "0.0.0.0" ]; then
40- nsline="dns-nameservers ${IPV4DNS0}"
41+ nsline="${IPV4DNS0}"
42 [ -n "$IPV4DNS1" -a "$IPV4DNS1" != "0.0.0.0" ] &&
43 nsline="${nsline} ${IPV4DNS1}"
44- printf "\t%s\n" "$nsline"
45- fi
46- [ -n "$DNSDOMAIN" -o -n "$DOMAINSEARCH" ] &&
47- printf "\t%s\n" "dns-search ${DNSDOMAIN} ${DOMAINSEARCH}"
48+ fi
49+ if [ -n "$IPV6DNS0" -a "$IPV6DNS0" != "0.0.0.0" ]; then
50+ nsline="${IPV6DNS0}"
51+ [ -n "$IPV6DNS1" -a "$IPV6DNS1" != "0.0.0.0" ] &&
52+ nsline="${nsline} ${IPV6DNS1}"
53+ fi
54+ [ -n "$nsline" ] && printf "\tdns-nameservers %s\n" "$nsline"
55+ [ -n "$DNSDOMAIN" -o -n "$DOMAINSEARCH" -o -n $IPV6DOMAINSEARCH] &&
56+ SEARCH=" ${DNSDOMAIN} ${DOMAINSEARCH} ${IPV6DOMAINSEARCH}" &&
57+ printf "\tdns-search %s\n" "${SEARCH}"
58 done >> "$tmpf"
59
60 [ -d /run/network ] || mkdir /run/network

Subscribers

People subscribed via source and target branches