diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2012-08-31 15:20:25 +0100 |
---|---|---|
committer | Richard W.M. Jones <rjones@redhat.com> | 2012-08-31 16:17:24 +0100 |
commit | 3ed3e23ed09a765a3275ca2d82518b335ede759f (patch) | |
tree | 91889c4ec2adf390dca04b14fec24057b3867050 /src | |
parent | 3728c122f1b2c235aaf92da077e307ffd2fb2178 (diff) | |
download | libguestfs-3ed3e23ed09a765a3275ca2d82518b335ede759f.tar.gz libguestfs-3ed3e23ed09a765a3275ca2d82518b335ede759f.tar.xz libguestfs-3ed3e23ed09a765a3275ca2d82518b335ede759f.zip |
Copy the kernel so that libvirt can add an SELinux label to it. NB. This requires febootstrap >= 3.20 with --copy-kernel flag.
Diffstat (limited to 'src')
-rw-r--r-- | src/appliance.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/appliance.c b/src/appliance.c index d206f3a5..4ed7bd76 100644 --- a/src/appliance.c +++ b/src/appliance.c @@ -106,7 +106,7 @@ gl_lock_define_initialized (static, building_lock); * $TMPDIR/.guestfs-$UID/ and consists of four files: * * $TMPDIR/.guestfs-$UID/checksum - the checksum - * $TMPDIR/.guestfs-$UID/kernel - symlink to the kernel + * $TMPDIR/.guestfs-$UID/kernel - the kernel * $TMPDIR/.guestfs-$UID/initrd - the febootstrap initrd * $TMPDIR/.guestfs-$UID/root - the appliance * @@ -643,7 +643,7 @@ hard_link_to_cached_appliance (guestfs_h *g, perrorf (g, "link: %s %s", filename, *kernel); goto error; } - (void) lutimes (filename, NULL); /* lutimes because it's a symlink */ + (void) utimes (filename, NULL); snprintf (filename, len, "%s/initrd", cachedir); (void) unlink (*initrd); @@ -706,6 +706,7 @@ run_supermin_helper (guestfs_h *g, const char *supermin_path, argv[i++] = "-g"; argv[i++] = gid; } + argv[i++] = "--copy-kernel"; argv[i++] = "-f"; argv[i++] = "ext2"; argv[i++] = supermin_d; |