small fix

This commit is contained in:
teldra 2021-03-13 11:46:15 +01:00
parent 9d9cc5e3c4
commit 09ec2190ee
2 changed files with 25 additions and 18 deletions

View File

@ -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}"

View File

@ -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