lxc

Merge lp:~darkmuggle-deactivatedaccount/lxc/ubuntu-cloud-template_lp977376 into lp:ubuntu/precise/lxc

Proposed by Ben Howard
Status: Superseded
Proposed branch: lp:~darkmuggle-deactivatedaccount/lxc/ubuntu-cloud-template_lp977376
Merge into: lp:ubuntu/precise/lxc
Diff against target: 44 lines (+9/-4)
1 file modified
templates/lxc-ubuntu-cloud.in (+9/-4)
To merge this branch: bzr merge lp:~darkmuggle-deactivatedaccount/lxc/ubuntu-cloud-template_lp977376
Reviewer Review Type Date Requested Status
Ubuntu branches Pending
Review via email: mp+101261@code.launchpad.net

Description of the change

Fixes userdata handling of ubuntu-cloud tempate LP: 977376

To post a comment you must log in.
92. By Ben Howard

Fixed ubuntu-cloud template user-data handling (LP: 977376)

Unmerged revisions

92. By Ben Howard

Fixed ubuntu-cloud template user-data handling (LP: 977376)

91. By Stéphane Graber

Add missing space after lxc.network.hwaddr

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'templates/lxc-ubuntu-cloud.in'
2--- templates/lxc-ubuntu-cloud.in 2012-04-03 02:22:04 +0000
3+++ templates/lxc-ubuntu-cloud.in 2012-04-09 17:43:33 +0000
4@@ -119,7 +119,7 @@
5 return 0
6 }
7
8-options=$(getopt -o a:hp:r:n:Fi:CLS:T:ds: -l arch:,help,path:,release:,name:,flush-cache,hostid:,auth-key:,cloud,no_locales,tarball:,debug,stream: -- "$@")
9+options=$(getopt -o a:hp:r:n:Fi:CLS:T:ds: -l arch:,help,path:,release:,name:,flush-cache,hostid:,auth-key:,cloud,no_locales,tarball:,debug,stream:,userdata: -- "$@")
10 if [ $? -ne 0 ]; then
11 usage $(basename $0)
12 exit 1
13@@ -209,6 +209,11 @@
14 exit 1
15 fi
16
17+if [ -n "$userdata" -a ! -f "$userdata" ]; then
18+ echo "Userdata does not exist"
19+ exit 1
20+fi
21+
22 if [ -z "$path" ]; then
23 echo "'path' parameter is required"
24 exit 1
25@@ -324,8 +329,9 @@
26 echo "Inserted SSH public key from $auth_key into /home/ubuntu/.ssh/authorized_keys"
27 fi
28
29- if [ ! -f $userdata ]; then
30- cp $userdata $data_d/user-data
31+ if [ -f "$userdata" ]; then
32+ echo "Using custom user-data"
33+ cp $userdata $seed_d/user-data
34 else
35
36 if [ -z "$MIRROR" ]; then
37@@ -339,7 +345,6 @@
38 manage_etc_hosts: localhost
39 locale: $(/usr/bin/locale | awk -F= '/LANG=/ {print$NF}')
40 EOF
41-
42 fi
43
44 chroot $rootfs /usr/sbin/usermod -U ubuntu

Subscribers

People subscribed via source and target branches

to all changes: