#!/bin/sh
set -e

PREREQS=""
case $1 in
    prereqs) echo "${PREREQS}"; exit 0;;
esac

. /usr/share/initramfs-tools/hook-functions

needs="tar xz" #gzip gunzip"
for need in $needs; do fp=$(which $need) && copy_exec "$fp" /bin; done

## The busybox versions of gzip and gunzip are sufficient, so use them rather
## than the full programs via copy_exec.  However, because of odd behavior in
## initramfs-tools, if we put symlinks in /bin, then
## initramfs-tools/hooks/busybox will remove them.  So instead, use /sbin
bbox="gzip gunzip"
[ -d "$DESTDIR/sbin" ] || mkdir -p "$DESTDIR/sbin"
for need in $bbox; do ln -sf ../bin/busybox "$DESTDIR/sbin/$need"; done

manual_add_modules squashfs

# vi: ts=4 noexpandtab
