Skip to content

Commit

Permalink
fix busybox image
Browse files Browse the repository at this point in the history
See inline comment for details.

Signed-off-by: Tycho Andersen <tycho.andersen@canonical.com>
Tycho Andersen committed Nov 5, 2015
1 parent 128068f commit 481275b
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions scripts/lxd-images
Original file line number Diff line number Diff line change
@@ -339,6 +339,16 @@ class Busybox(object):
target_tarball.addfile(metadata_file,
io.BytesIO(metadata_yaml))

# Add an /etc/inittab; this is to work around:
# http://lists.busybox.net/pipermail/busybox/2015-November/083618.html
# Basically, since there are some hardcoded defaults that misbehave, we
# just pass an empty inittab so those aren't applied, and then busybox
# doesn't spin forever.
inittab = tarfile.TarInfo()
inittab.size = 1
inittab.name = "/rootfs/etc/inittab"
target_tarball.addfile(inittab, io.BytesIO(b"\n"))

target_tarball.close()
if split:
target_tarball_rootfs.close()

0 comments on commit 481275b

Please sign in to comment.