From e7bad1176496d212a70e8235f800f988619c4a0a Mon Sep 17 00:00:00 2001 From: parazyd Date: Sun, 8 May 2016 12:43:52 +0200 Subject: [PATCH] custom script support --- arm/extra/scrinclude/README | 4 ++++ arm/profiles/common-devuan | 19 +++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 arm/extra/scrinclude/README diff --git a/arm/extra/scrinclude/README b/arm/extra/scrinclude/README new file mode 100644 index 0000000..9e46f05 --- /dev/null +++ b/arm/extra/scrinclude/README @@ -0,0 +1,4 @@ +include scripts here you wish to execute in the third-stage, after finishing the +system installation. the scripts will be sourced so call what you need. + +the naming scheme should be `foo.sh` diff --git a/arm/profiles/common-devuan b/arm/profiles/common-devuan index d4a2fc8..534a8c6 100644 --- a/arm/profiles/common-devuan +++ b/arm/profiles/common-devuan @@ -151,10 +151,23 @@ copy-pkginclude() { } } +copy-cust() { + fn copy-cust + + sudo mkdir ${writebase}/cust + scrincludes=`find $R/arm/extra/scrinclude -type f -name "*.sh"` + [[ -z $scrincludes ]] || { + for i in ${scrincludes}; do + sudo cp -v ${i} ${writebase}/cust/ + done + } +} + write-third-stage() { fn write-third-stage copy-pkginclude + copy-cust cat <