Added password for user

This commit is contained in:
TuDatTr
2020-05-24 09:02:28 +02:00
parent 03c79d8463
commit c42b0af8fe
3 changed files with 24 additions and 21 deletions

View File

@@ -7,8 +7,8 @@ if [[ ${PIPESTATUS[0]} -ne 4 ]]; then
exit 1
fi
OPTIONS=d:t:l:h:u:s:
LONGOPTS=device:,timezone:,locale:,hostname:,username:,sudogrp:,help
OPTIONS=d:t:l:h:u:s:p:
LONGOPTS=device:,timezone:,locale:,hostname:,username:,sudogrp:,help,password:
! PARSED=$(getopt --options=$OPTIONS --longoptions=$LONGOPTS --name "$0" -- "$@")
if [[ ${PIPESTATUS[0]} -ne 0 ]]; then
@@ -47,6 +47,10 @@ while true; do
username="$2"
shift 2
;;
-p|--password)
password="$2"
shift 2
;;
-s|--sudogrp)
sudogrp="$2"
shift 2
@@ -127,7 +131,7 @@ cp $CWD/etc/X11/xorg.conf.d/30-touchpad.conf /mnt/root/etc/X11/xorg.conf.d/30-to
cp $CWD/etc/iptables/iptables.rules /mnt/root/etc/iptables/iptables.rules
chmod +x /mnt/root/march-reboot.sh
arch-chroot /mnt /root/march-chroot.sh -t "$timezone" -l "$locale" -h "$hostname" -u "$username" -s "$sudogrp" -c "$cryptroot" -r "$rootpart"
arch-chroot /mnt /root/march-chroot.sh -t "$timezone" -l "$locale" -h "$hostname" -u "$username" -s "$sudogrp" -c "$cryptroot" -r "$rootpart" -p "$password"
umount $bootpart
swapoff $swappart