diff --git a/run_in_chroot.sh b/run_in_chroot.sh index 8fc6b5b..8ece96f 100755 --- a/run_in_chroot.sh +++ b/run_in_chroot.sh @@ -18,11 +18,14 @@ for i in $(find "${vars}" -type f); do done input="${@}" +max="${#input[@]}" echo "${input[@]}" -for i in $(seq 1 "${#input[@]}"); do +for i in $(seq 1 "${max}"); do if [[ "${i}" == "${#input[@]}" ]]; then - cfg+=( [diskpw]="${1}" ) + echo diskp "${input[$i]}" + cfg+=( [diskpw]="${input[$i]}" ) else + echo user "${input[$i]}" users+=( [pw$i]="${input[$i]}" ) fi done