2 # install guestfsd specific stuff
4 # Kernel modules take up nearly half of the image. Only include ones
5 # which are on the whitelist.
6 exec 5<../appliance/kmod.whitelist
8 while read kmod 0<&5; do
9 whitelist="$whitelist -a -not -name $kmod"
13 echo "Module whitelist: $whitelist"
14 find $DEBIRF_ROOT/lib/modules/*/kernel -name '*.ko' $whitelist -a -exec rm '{}' \;
16 # install additional packages:
17 PKGLIST=$(< packagelist)
18 echo "Will add $PKGLIST"
19 debirf_exec apt-get --assume-yes install $PKGLIST
20 debirf_exec apt-get --assume-yes remove vim-tiny dhcp3-client iptables
22 debirf_exec mkdir -p --mode=0777 /sysroot
24 # cleanup some other heavy lifters:
25 rm -rf "$DEBIRF_ROOT"/usr/share/doc/
26 rm -rf "$DEBIRF_ROOT"/usr/share/zoneinfo/
27 rm -rf "$DEBIRF_ROOT"/usr/share/man/
29 # Install the actual appliance:
31 install -o root -g root -m 0755 ../daemon/guestfsd "$DEBIRF_ROOT"/sbin/guestfsd
32 install -o root -g root -m 0755 init "$DEBIRF_ROOT"/sbin/init