/usr/share/initramfs-tools/hooks/updateroot is in cloud-initramfs-updateroot 0.40ubuntu1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | #!/bin/sh
set -e
prereqs() {
local o="/scripts/init-bottom/overlayroot" p=""
for p in "$DESTDIR/" ""; do
[ -e "$p$o" ] && echo "overlayroot" && return 0
done
}
[ "$1" = "prereqs" ] && { prereqs; exit; }
. /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
# vi: ts=4 noexpandtab
|