appliance: Put /init in a separate supermin appliance component.
[libguestfs.git] / appliance / Makefile.am
index bbf3c24..dec1c15 100644 (file)
@@ -43,17 +43,18 @@ fs_DATA += kmod.whitelist
 superminfs_DATA = \
        supermin.d/base.img \
        supermin.d/daemon.img \
+       supermin.d/init.img \
        supermin.d/hostfiles
 endif
 
 # Don't change these names - they must be the same as in '*.sh' scripts.
-INITRAMFSIMG = initramfs.$(REPO).$(host_cpu).img
-VMLINUZ = vmlinuz.$(REPO).$(host_cpu)
+INITRAMFSIMG = initramfs.$(host_cpu).img
+VMLINUZ = vmlinuz.$(host_cpu)
 
 # This is for building the normal appliance:
 $(INITRAMFSIMG) $(VMLINUZ): $(top_builddir)/initramfs/fakeroot.log
 
-$(top_builddir)/initramfs/fakeroot.log: make.sh kmod.whitelist packagelist $(top_builddir)/daemon/guestfsd
+$(top_builddir)/initramfs/fakeroot.log: make.sh kmod.whitelist packagelist
        mv $(INITRAMFSIMG) $(INITRAMFSIMG).bak 2>/dev/null; :
        mv $(VMLINUZ) $(VMLINUZ).bak 2>/dev/null; :
        if ! bash make.sh; then rm -f $@; exit 1; fi
@@ -101,6 +102,14 @@ supermin.d/daemon.img: $(INITRAMFSIMG)
        (cd $(top_builddir)/initramfs && \
          echo -e "sbin\nsbin/guestfsd" | cpio --quiet -o -H newc ) > $@-t
        mv $@-t $@
+
+supermin.d/init.img: $(INITRAMFSIMG)
+       mkdir -p supermin.d
+       rm -f $@ $@-t
+       (cd $(top_builddir)/initramfs && \
+         echo -e "init\n" | cpio --quiet -o -H newc ) > $@-t
+       mv $@-t $@
+
 endif
 
 # Extra symlinks needed by the Debian appliance.