diff options
author | Richard Jones <rjones@redhat.com> | 2010-05-13 17:07:17 +0100 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2010-05-13 18:52:15 +0100 |
commit | 8700a55d52f25f60f01ef1b67cff6d5c0071700b (patch) | |
tree | da79dc6eb77fefa02bfe00325f7c975ca1ae9238 /src/guestfs.c | |
parent | 55748a94bc840ac07d3c211119372cd16b31f1a0 (diff) | |
download | libguestfs-8700a55d52f25f60f01ef1b67cff6d5c0071700b.tar.gz libguestfs-8700a55d52f25f60f01ef1b67cff6d5c0071700b.tar.xz libguestfs-8700a55d52f25f60f01ef1b67cff6d5c0071700b.zip |
Unify supermin appliance building using febootstrap 2.7
Diffstat (limited to 'src/guestfs.c')
-rw-r--r-- | src/guestfs.c | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/src/guestfs.c b/src/guestfs.c index 027e08c9..0e4cb73b 100644 --- a/src/guestfs.c +++ b/src/guestfs.c @@ -928,10 +928,6 @@ static void print_cmdline (guestfs_h *g); static const char *kernel_name = "vmlinuz." REPO "." host_cpu; static const char *initrd_name = "initramfs." REPO "." host_cpu ".img"; -static const char *supermin_name = - "initramfs." REPO "." host_cpu ".supermin.img"; -static const char *supermin_hostfiles_name = - "initramfs." REPO "." host_cpu ".supermin.hostfiles"; int guestfs__launch (guestfs_h *g) @@ -998,8 +994,7 @@ guestfs__launch (guestfs_h *g) fprintf (stderr, "looking for supermin appliance in current directory\n"); if (dir_contains_files (".", - supermin_name, supermin_hostfiles_name, - "kmod.whitelist", NULL)) { + "supermin.d", "kmod.whitelist", NULL)) { if (build_supermin_appliance (g, ".", &kernel, &initrd) == -1) return -1; break; @@ -1011,8 +1006,7 @@ guestfs__launch (guestfs_h *g) fprintf (stderr, "looking for supermin appliance in %s\n", pelem); if (dir_contains_files (pelem, - supermin_name, supermin_hostfiles_name, - "kmod.whitelist", NULL)) { + "supermin.d", "kmod.whitelist", NULL)) { if (build_supermin_appliance (g, pelem, &kernel, &initrd) == -1) return -1; break; @@ -1591,11 +1585,15 @@ build_supermin_appliance (guestfs_h *g, const char *path, snprintf (*initrd, len+8, "%s/initrd", g->tmpdir); snprintf (cmd, sizeof cmd, - "PATH='%s':$PATH " - "libguestfs-supermin-helper%s '%s' " host_cpu " " REPO " %s %s", - path, + "febootstrap-supermin-helper%s " + "-k '%s/kmod.whitelist' " + "'%s/supermin.d' " + host_cpu " " + "%s %s", g->verbose ? " --verbose" : "", - path, *kernel, *initrd); + path, + path, + *kernel, *initrd); if (g->verbose) print_timestamped_message (g, "%s", cmd); |