Merge lp:~xnox/vmbuilder/jenkins_kvm into lp:~ubuntu-on-ec2/vmbuilder/jenkins_kvm

Proposed by Dimitri John Ledkov
Status: Merged
Merged at revision: 790
Proposed branch: lp:~xnox/vmbuilder/jenkins_kvm
Merge into: lp:~ubuntu-on-ec2/vmbuilder/jenkins_kvm
Diff against target: 124 lines (+20/-15)
5 files modified
templates/default.tmpl (+4/-3)
templates/img-azure.tmpl (+4/-3)
templates/img-juju.tmpl (+4/-3)
templates/img-update.tmpl (+4/-3)
templates/img-vagrant.tmpl (+4/-3)
To merge this branch: bzr merge lp:~xnox/vmbuilder/jenkins_kvm
Reviewer Review Type Date Requested Status
Francis Ginther (community) Approve
Dan Watkins (community) Approve
Canonical Foundations Team Pending
Review via email: mp+332084@code.launchpad.net

Description of the change

Entirely untested, as I don't know how.

To post a comment you must log in.
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Please let me know if there are any other templates/branches to fix.

Revision history for this message
Dan Watkins (oddbloke) wrote :

LGTM

review: Approve
Revision history for this message
Francis Ginther (fginther) wrote :

Approve

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'templates/default.tmpl'
2--- templates/default.tmpl 2015-10-21 08:39:50 +0000
3+++ templates/default.tmpl 2017-10-10 22:44:58 +0000
4@@ -91,8 +91,8 @@
5 chmod 0755 "${mp}/usr/sbin/policy-rc.d" ||
6 fail "Unable to make policy-rc.d executable"
7
8- rm "${mp}/etc/resolv.conf" ||
9- fail "Unable to remove /etc/resolv.conf"
10+ mv "${mp}/etc/resolv.conf" "${mp}/etc/resolv.conf.orig" ||
11+ fail "Unable to backup /etc/resolv.conf"
12
13 cp /etc/resolv.conf "${mp}/etc/resolv.conf" &&
14 debug "Placed resolv.conf in image" ||
15@@ -123,7 +123,8 @@
16 rm "${mp}/etc/resolv.conf" ||
17 fail "Failed to remove /etc/resolv.conf"
18
19- chroot "${mp}" ln -snf ../run/resolvconf/resolv.conf /etc/resolv.conf
20+ mv "${mp}/etc/resolv.conf.orig" "${mp}/etc/resolv.conf" ||
21+ fail "Unable to revert /etc/resolv.conf"
22 }
23
24 chroot_mount() {
25
26=== modified file 'templates/img-azure.tmpl'
27--- templates/img-azure.tmpl 2017-09-05 11:40:21 +0000
28+++ templates/img-azure.tmpl 2017-10-10 22:44:58 +0000
29@@ -68,8 +68,8 @@
30 chmod 0755 "${mp}/usr/sbin/policy-rc.d" ||
31 fail "Unable to make policy-rc.d executable"
32
33- rm "${mp}/etc/resolv.conf" ||
34- fail "Unable to remove /etc/resolv.conf"
35+ mv "${mp}/etc/resolv.conf" "${mp}/etc/resolv.conf.orig" ||
36+ fail "Unable to backup /etc/resolv.conf"
37
38 cp /etc/resolv.conf "${mp}/etc/resolv.conf" &&
39 debug "Placed resolv.conf in image" ||
40@@ -98,7 +98,8 @@
41 rm "${mp}/etc/resolv.conf" ||
42 fail "Failed to remove /etc/resolv.conf"
43
44- chroot "${mp}" ln -snf ../run/resolvconf/resolv.conf /etc/resolv.conf
45+ mv "${mp}/etc/resolv.conf.orig" "${mp}/etc/resolv.conf" ||
46+ fail "Unable to revert /etc/resolv.conf"
47 }
48
49 build_chroot() {
50
51=== modified file 'templates/img-juju.tmpl'
52--- templates/img-juju.tmpl 2015-09-24 21:05:42 +0000
53+++ templates/img-juju.tmpl 2017-10-10 22:44:58 +0000
54@@ -50,8 +50,8 @@
55 chmod 0755 "${mp}/usr/sbin/policy-rc.d" ||
56 fail "Unable to make policy-rc.d executable"
57
58- rm "${mp}/etc/resolv.conf" ||
59- fail "Unable to remove /etc/resolv.conf"
60+ mv "${mp}/etc/resolv.conf" "${mp}/etc/resolv.conf.orig" ||
61+ fail "Unable to backup /etc/resolv.conf"
62
63 cp /etc/resolv.conf "${mp}/etc/resolv.conf" &&
64 debug "Placed resolv.conf in image" ||
65@@ -80,7 +80,8 @@
66 rm "${mp}/etc/resolv.conf" ||
67 fail "Failed to remove /etc/resolv.conf"
68
69- chroot "${mp}" ln -snf ../run/resolvconf/resolv.conf /etc/resolv.conf
70+ mv "${mp}/etc/resolv.conf.orig" "${mp}/etc/resolv.conf" ||
71+ fail "Unable to revert /etc/resolv.conf"
72 }
73
74 build_chroot() {
75
76=== modified file 'templates/img-update.tmpl'
77--- templates/img-update.tmpl 2016-09-20 15:41:42 +0000
78+++ templates/img-update.tmpl 2017-10-10 22:44:58 +0000
79@@ -79,8 +79,8 @@
80 chmod 0755 "${mp}/usr/sbin/policy-rc.d" ||
81 fail "Unable to make policy-rc.d executable"
82
83- rm "${mp}/etc/resolv.conf" ||
84- fail "Unable to remove /etc/resolv.conf"
85+ mv "${mp}/etc/resolv.conf" "${mp}/etc/resolv.conf.orig" ||
86+ fail "Unable to backup /etc/resolv.conf"
87
88 cp /etc/resolv.conf "${mp}/etc/resolv.conf" &&
89 debug "Placed resolv.conf in image" ||
90@@ -109,7 +109,8 @@
91 rm "${mp}/etc/resolv.conf" ||
92 fail "Failed to remove /etc/resolv.conf"
93
94- chroot "${mp}" ln -snf ../run/resolvconf/resolv.conf /etc/resolv.conf
95+ mv "${mp}/etc/resolv.conf.orig" "${mp}/etc/resolv.conf" ||
96+ fail "Unable to revert /etc/resolv.conf"
97 }
98
99 build_chroot() {
100
101=== modified file 'templates/img-vagrant.tmpl'
102--- templates/img-vagrant.tmpl 2014-11-07 15:49:08 +0000
103+++ templates/img-vagrant.tmpl 2017-10-10 22:44:58 +0000
104@@ -52,8 +52,8 @@
105 chmod 0755 "${mp}/usr/sbin/policy-rc.d" ||
106 fail "Unable to make policy-rc.d executable"
107
108- rm "${mp}/etc/resolv.conf" ||
109- fail "Unable to remove /etc/resolv.conf"
110+ mv "${mp}/etc/resolv.conf" "${mp}/etc/resolv.conf.orig" ||
111+ fail "Unable to backup /etc/resolv.conf"
112
113 cp /etc/resolv.conf "${mp}/etc/resolv.conf" &&
114 debug "Placed resolv.conf in image" ||
115@@ -82,7 +82,8 @@
116 rm "${mp}/etc/resolv.conf" ||
117 fail "Failed to remove /etc/resolv.conf"
118
119- chroot "${mp}" ln -snf ../run/resolvconf/resolv.conf /etc/resolv.conf
120+ mv "${mp}/etc/resolv.conf.orig" "${mp}/etc/resolv.conf" ||
121+ fail "Unable to revert /etc/resolv.conf"
122 }
123
124 build_chroot() {

Subscribers

People subscribed via source and target branches