diff --git a/modules/30-users/pre b/modules/30-users/pre index 75fc0f7..5ecf13a 100644 --- a/modules/30-users/pre +++ b/modules/30-users/pre @@ -1,4 +1,4 @@ -module "start" "users" "Configuring Users" +module "start" "users" "Configuring User" repeat="" index="0" @@ -65,13 +65,16 @@ while echo $((index++)) > /dev/null; do input_pw "User ${users[name${counter}]} password" useradder "pw" "${counter}" "${output}" - - if ! yesno "More users?" "n"; then + if [[ "${standalone}" == "1" ]]; then + if ! yesno "More users?" "n"; then + break + fi + #set -x + repeat=1 + additional_user=() + else break fi - #set -x - repeat=1 - additional_user=() done useradder "am" "ount" "${counter}" diff --git a/modules/40-basesystem/install b/modules/40-basesystem/install index 9dc9156..e208467 100644 --- a/modules/40-basesystem/install +++ b/modules/40-basesystem/install @@ -64,19 +64,23 @@ sed -i "/HARDWARECLOCK/s/^#//g" "${dest}/etc/rc.conf" sed -i "/FONT=/s/^#//g" "${dest}/etc/rc.conf" if [[ ! ${cfg[fde_key_store]} == "none" ]]; then - echo "read -p \"Do you want to change Passwords? y/n \" -t 5 answer" > "${dest}"/etc/runit/core-services/99-changepwdisk.sh - echo "if [[ \"\${answer}\" == \"y\" ]]; then" >> "${dest}"/etc/runit/core-services/99-changepwdisk.sh - echo "echo \"Change PW for disk:\"" >> "${dest}"/etc/runit/core-services/99-changepwdisk.sh - echo "cryptsetup luksChangeKey /dev/disk/by-uuid/${cfg[partuuid]}" >> "${dest}"/etc/runit/core-services/99-changepwdisk.sh - echo "rm -rf /etc/runit/core-services/99-changepwdisk.sh" >> "${dest}"/etc/runit/core-services/99-changepwdisk.sh - echo "fi" >> "${dest}"/etc/runit/core-services/99-changepwdisk.sh + if [[ "${cfg[diskpw]}" == "oem" ]]; then + echo "read -p \"Do you want to change Passwords? y/n \" -t 5 answer" > "${dest}"/etc/runit/core-services/99-changepwdisk.sh + echo "if [[ \"\${answer}\" == \"y\" ]]; then" >> "${dest}"/etc/runit/core-services/99-changepwdisk.sh + echo "echo \"Change PW for disk:\"" >> "${dest}"/etc/runit/core-services/99-changepwdisk.sh + echo "cryptsetup luksChangeKey /dev/disk/by-uuid/${cfg[partuuid]}" >> "${dest}"/etc/runit/core-services/99-changepwdisk.sh + echo "rm -rf /etc/runit/core-services/99-changepwdisk.sh" >> "${dest}"/etc/runit/core-services/99-changepwdisk.sh + echo "fi" >> "${dest}"/etc/runit/core-services/99-changepwdisk.sh + fi - echo "read -p \"Do you want to change Passwords? y/n \" -t 5 answer" > "${dest}"/etc/runit/core-services/99-changepwuser.sh - echo "if [[ \"\${answer}\" == \"y\" ]]; then" >> "${dest}"/etc/runit/core-services/99-changepwuser.sh - echo "echo \"Change PW for ${users[name1]}?\"" >> "${dest}"/etc/runit/core-services/99-changepwuser.sh - echo "passwd ${users[name1]}" >> "${dest}"/etc/runit/core-services/99-changepwuser.sh - echo "rm -rf /etc/runit/core-services/99-changepwuser.sh" >> "${dest}"/etc/runit/core-services/99-changepwuser.sh - echo "fi" >> "${dest}"/etc/runit/core-services/99-changepwuser.sh + if [[ "${users[pw1]}" == "oem" ]]; then + echo "read -p \"Do you want to change Passwords? y/n \" -t 5 answer" > "${dest}"/etc/runit/core-services/99-changepwuser.sh + echo "if [[ \"\${answer}\" == \"y\" ]]; then" >> "${dest}"/etc/runit/core-services/99-changepwuser.sh + echo "echo \"Change PW for ${users[name1]}?\"" >> "${dest}"/etc/runit/core-services/99-changepwuser.sh + echo "passwd ${users[name1]}" >> "${dest}"/etc/runit/core-services/99-changepwuser.sh + echo "rm -rf /etc/runit/core-services/99-changepwuser.sh" >> "${dest}"/etc/runit/core-services/99-changepwuser.sh + echo "fi" >> "${dest}"/etc/runit/core-services/99-changepwuser.sh + fi fi module end