2021-03-11 14:04:04 +01:00
|
|
|
#!/bin/bash
|
|
|
|
dir="/tmp/installer"
|
|
|
|
wrksrc="${dir}"/tmp
|
|
|
|
functions="${dir}/functions"
|
|
|
|
modules="${dir}/modules"
|
|
|
|
config_mods="${modules}/config"
|
|
|
|
install_mods="${modules}/install"
|
|
|
|
chroot_mods="${modules}/chroot"
|
|
|
|
vars="${wrksrc}/vars"
|
|
|
|
declare -A cfg=()
|
|
|
|
declare -A users=()
|
|
|
|
#set -x
|
|
|
|
|
|
|
|
source "${functions}"/functions
|
|
|
|
|
2021-03-16 20:17:51 +01:00
|
|
|
for i in $(find "${vars}" -type f); do
|
2021-03-16 22:25:12 +01:00
|
|
|
echo "${i}"
|
2021-03-16 20:17:51 +01:00
|
|
|
source "${i}"
|
|
|
|
done
|
2021-03-16 22:38:22 +01:00
|
|
|
cfg+=( [diskpw]="${1}" )
|
|
|
|
|
|
|
|
input="${@}"
|
|
|
|
for i in $(seq 1 "${#input[@]}"); do
|
|
|
|
[[ ! "${i}" == "1" ]] && users+=( [pw$i]="${input[$i]}" )
|
|
|
|
done
|
2021-03-16 20:17:51 +01:00
|
|
|
|
|
|
|
export run="install"
|
|
|
|
for i in $(find "${modules}" -mindepth 1 -maxdepth 1 -type d | sort -n ); do
|
|
|
|
test -f "${i}"/install && source "${i}"/install
|
|
|
|
done
|
|
|
|
|
2021-03-11 14:04:04 +01:00
|
|
|
export run="post"
|
|
|
|
for i in $(find "${modules}" -mindepth 1 -maxdepth 1 -type d | sort -n); do
|
|
|
|
test -f "${i}"/post && source "${i}"/post
|
2021-03-16 20:17:51 +01:00
|
|
|
done
|