diff options
author | Richard Jones <rjones@redhat.com> | 2009-04-03 01:13:42 +0100 |
---|---|---|
committer | Richard Jones <rjones@redhat.com> | 2009-04-03 01:13:42 +0100 |
commit | 207056e82372093fa5bc678a9e55a2abc33704fa (patch) | |
tree | 5180a7b28846951cee877921c54750a8985e8ddb /make-initramfs.sh.in | |
parent | 11d20e2b9f7dc1becba30d16c378c704a3ad1f50 (diff) | |
download | libguestfs-207056e82372093fa5bc678a9e55a2abc33704fa.tar.gz libguestfs-207056e82372093fa5bc678a9e55a2abc33704fa.tar.xz libguestfs-207056e82372093fa5bc678a9e55a2abc33704fa.zip |
Add update-initramfs.sh.in so we don't need to rebuild initramfs for
small changes in the daemon.
Diffstat (limited to 'make-initramfs.sh.in')
-rwxr-xr-x | make-initramfs.sh.in | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/make-initramfs.sh.in b/make-initramfs.sh.in index 0812edbe..aaaa92ef 100755 --- a/make-initramfs.sh.in +++ b/make-initramfs.sh.in @@ -34,7 +34,8 @@ fi # Decide on names for the final output. These have to match Makefile.am. output=initramfs.@REPO@.@host_cpu@.img koutput=vmlinuz.@REPO@.@host_cpu@ -rm -f $output $koutput +rm -f $output +rm -f $koutput # Create the basic initramfs. @FEBOOTSTRAP@ $modules @REPO@ initramfs @MIRROR@ @@ -47,7 +48,7 @@ find initramfs -name '*python*' -print0 | xargs -0 rm -rf # Modules take up nearly half of the image. It's a rough guess that # we don't need any drivers (which take up most of the space). # (We need to keep kernel/net/sunrpc for NFS) -rm -rf initramfs/lib/modules/*/kernel/{drivers,sound} +#rm -rf initramfs/lib/modules/*/kernel/{drivers,sound} rm -rf initramfs/lib/modules/*/kernel/arch/x86/kvm # Pull the kernel out into the current directory. We don't want it in @@ -73,9 +74,6 @@ if [ ! -f initramfs/etc/fstab ]; then @FEBOOTSTRAP_RUN@ initramfs -- touch /etc/fstab fi -# Copy the daemon into the filesystem. -#cp daemon/guestfsd initramfs/sbin - # Create the init script. cat > initramfs/init.new <<'__EOF__' #!/bin/sh @@ -105,6 +103,12 @@ fi @FEBOOTSTRAP_RUN@ initramfs -- install -m 0755 -o root -g root /init.new /init rm initramfs/init.new +# Copy the daemon into the filesystem. +cp @abs_builddir@/daemon/guestfsd initramfs/sbin/guestfsd.new +@FEBOOTSTRAP_RUN@ initramfs -- \ + install -m 0755 -o root -g root /sbin/guestfsd.new /sbin/guestfsd +rm initramfs/sbin/guestfsd.new + # Generate final image. @FEBOOTSTRAP_TO_INITRAMFS@ initramfs > $output-t mv $output-t $output |