summaryrefslogtreecommitdiff
path: root/helpers/lh_hook
blob: 084a385fa9420c697850f2076696e97a50732f4e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh

# lh_hook

# Process flavour specific hooks
if [ -r "${BASE}"/hooks/"${LIVE_FLAVOUR}" ]
then
	grep -v "^#" "${BASE}"/hooks/"${LIVE_FLAVOUR}" > "${LIVE_CHROOT}"/root/"${LIVE_FLAVOUR}"
	LIVE_DEBCONF_FRONTEND="readline" LIVE_DEBCONF_PRIORITY="low" lh_chroot "sh /root/${LIVE_FLAVOUR}"
	rm -f "${LIVE_CHROOT}"/root/"${LIVE_FLAVOUR}"
fi

# Execute extra command in the chroot
if [ -r "${LIVE_HOOK}" ]
then
	# FIXME
	LIVE_DEBCONF_FRONTEND="readline" LIVE_DEBCONF_PRIORITY="low" lh_chroot "`cat ${LIVE_HOOK}`"
elif [ -n "${LIVE_HOOK}" ]
then
	LIVE_DEBCONF_FRONTEND="readline" LIVE_DEBCONF_PRIORITY="low" lh_chroot "${LIVE_HOOK}"
fi