Merge lp:~jibel/ubuntu/raring/flash-kernel/skip_inside_lxc_container into lp:ubuntu/raring/flash-kernel

Proposed by Jean-Baptiste Lallement
Status: Merged
Merge reported by: Loïc Minier
Merged at revision: not available
Proposed branch: lp:~jibel/ubuntu/raring/flash-kernel/skip_inside_lxc_container
Merge into: lp:ubuntu/raring/flash-kernel
Diff against target: 63 lines (+23/-0)
4 files modified
debian/changelog (+6/-0)
initramfs-hook/flash-kernel (+6/-0)
initramfs-tools/hooks/flash_kernel_set_root (+6/-0)
kernel-hook/zz-flash-kernel (+5/-0)
To merge this branch: bzr merge lp:~jibel/ubuntu/raring/flash-kernel/skip_inside_lxc_container
Reviewer Review Type Date Requested Status
Loïc Minier Approve
Ubuntu branches Pending
Review via email: mp+155772@code.launchpad.net

Description of the change

This patch skips flash-kernel when run inside an LXC container by checking the result of 'running-in-container'

To post a comment you must log in.
Revision history for this message
Loïc Minier (lool) wrote :

LGTM

review: Approve

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 2012-12-04 17:24:49 +0000
3+++ debian/changelog 2013-03-27 15:48:25 +0000
4@@ -1,3 +1,9 @@
5+flash-kernel (3.0~rc.4ubuntu30) raring; urgency=low
6+
7+ * Do not run flash-kernel inside an LXC container (LP: #1160360)
8+
9+ -- Jean-Baptiste Lallement <jean-baptiste.lallement@canonical.com> Wed, 27 Mar 2013 16:29:20 +0100
10+
11 flash-kernel (3.0~rc.4ubuntu29) raring; urgency=low
12
13 * determine the latest installer kernel version in the target rootfs instead
14
15=== modified file 'initramfs-hook/flash-kernel'
16--- initramfs-hook/flash-kernel 2012-06-22 11:20:39 +0000
17+++ initramfs-hook/flash-kernel 2013-03-27 15:48:25 +0000
18@@ -13,6 +13,12 @@
19 exit 0
20 fi
21
22+# Do not run inside an LXC container
23+if type running-in-container >/dev/null 2>&1 && \
24+ running-in-container >/dev/null; then
25+ exit 0
26+fi
27+
28 abi="$1"
29 # ignored
30 _initrd="$2"
31
32=== modified file 'initramfs-tools/hooks/flash_kernel_set_root'
33--- initramfs-tools/hooks/flash_kernel_set_root 2012-09-13 14:02:48 +0000
34+++ initramfs-tools/hooks/flash_kernel_set_root 2013-03-27 15:48:25 +0000
35@@ -57,6 +57,12 @@
36 exit 0
37 fi
38
39+# Do not run inside an LXC container
40+if type running-in-container >/dev/null 2>&1 && \
41+ running-in-container >/dev/null; then
42+ exit 0
43+fi
44+
45 # Record the root filesystem device for use during boot
46 rootdev=$(egrep '^[^# ]+[ ]+/[ ]' /etc/fstab | awk '{print $1}') || true
47
48
49=== modified file 'kernel-hook/zz-flash-kernel'
50--- kernel-hook/zz-flash-kernel 2012-06-20 16:41:28 +0000
51+++ kernel-hook/zz-flash-kernel 2013-03-27 15:48:25 +0000
52@@ -15,6 +15,11 @@
53 exit 0
54 fi
55
56+# Do not run inside an LXC container
57+if type running-in-container >/dev/null 2>&1 && \
58+ running-in-container >/dev/null; then
59+ exit 0
60+fi
61
62 # this script is used as postinst.d and postrm.d script; this is used to
63 # differentiate between the two

Subscribers

People subscribed via source and target branches