#!/bin/sh
# hook for adding overlay modules

set -e

# initramfs-tools header

PREREQ=""
prereqs()
{
	echo "${PREREQ}"
}

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

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

manual_add_modules overlay

if command -v deepin-immutable-ctl >/dev/null 2>&1; then
	copy_file script /usr/bin/deepin-mount-root.sh
fi

# The cp in busybox is different from the cp in the system
if [ -f /usr/bin/cp ]; then
	copy_exec /usr/bin/cp /usr/bin/cp.fix
fi
exit 0