summaryrefslogtreecommitdiffstats
path: root/inst
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2018-01-13 00:56:40 (EST)
committer P. J. McDermott <pj@pehjota.net>2018-01-13 00:56:40 (EST)
commitb490b9ebf4196521ec33463300dc93f30f509ce8 (patch)
treef4317d510e5f351fbaab9c2cc61512a5e24d2903 /inst
parent3c89678ff7a90873bd4a48207bce7d373f17bdf2 (diff)
downloadpc-inst-b490b9ebf4196521ec33463300dc93f30f509ce8.zip
pc-inst-b490b9ebf4196521ec33463300dc93f30f509ce8.tar.gz
pc-inst-b490b9ebf4196521ec33463300dc93f30f509ce8.tar.bz2
inst: Load postinst code from separate files
Diffstat (limited to 'inst')
-rwxr-xr-xinst7
1 files changed, 7 insertions, 0 deletions
diff --git a/inst b/inst
index 6189752..c7ff1f8 100755
--- a/inst
+++ b/inst
@@ -4,6 +4,7 @@ set -u
host=
postinst_pkgs=
+postinst_script=
dev=
target=
@@ -394,6 +395,11 @@ do_install_extra()
return 1
}
+do_postinst()
+{
+ . "${postinst_script}"
+}
+
do_chroot_cleanup()
{
local mp=
@@ -481,6 +487,7 @@ main()
. "${host_dir}/conf"
postinst_pkgs="$(sed 's/#.*$//;' "${host_dir}/pkgs")"
+ postinst_script="${host_dir}/postinst"
log="$(mktemp)"
exec 4>"${log}"