diff options
author | JozanLeClerc <bousset.rudy@gmail.com> | 2019-11-28 18:48:49 +0100 |
---|---|---|
committer | JozanLeClerc <bousset.rudy@gmail.com> | 2019-11-28 19:02:45 +0100 |
commit | d427bd6a8e8458e419d6d8c6b16f3340c63f3f90 (patch) | |
tree | 8208935c51262b2795ea94b124a1707610b88081 | |
parent | One more func (diff) | |
download | arch-installer-d427bd6a8e8458e419d6d8c6b16f3340c63f3f90.tar.gz arch-installer-d427bd6a8e8458e419d6d8c6b16f3340c63f3f90.tar.bz2 arch-installer-d427bd6a8e8458e419d6d8c6b16f3340c63f3f90.tar.xz arch-installer-d427bd6a8e8458e419d6d8c6b16f3340c63f3f90.tar.zst arch-installer-d427bd6a8e8458e419d6d8c6b16f3340c63f3f90.zip |
Add user function added, dash shell option too
-rwxr-xr-x | arch-installer.sh | 65 |
1 files changed, 24 insertions, 41 deletions
diff --git a/arch-installer.sh b/arch-installer.sh index ab9f8f3..4b2db4a 100755 --- a/arch-installer.sh +++ b/arch-installer.sh @@ -287,9 +287,10 @@ jo_get_usr_config() { fi usrshell=$(dialog --title "$1"\ --menu "Choose a shell for $usr:"\ - 10 40 3\ - "zsh" "The z shell"\ - "bash" "The bourne-against shell"\ + 11 40 4\ + "zsh" "The Z Shell"\ + "dash" "The Debian Almquist Shell"\ + "bash" "The Bourne-again Shell"\ "sh" "The OG shell"\ 3>&1 1>&2 2>&3 3>&-) } @@ -427,7 +428,7 @@ jo_chroot_base() { dialog --title "$1"\ --infobox "Setting up the system"\ 4 35 - arch-chroot /mnt/arch << ARCH_CHROOT_CMDS > /dev/null + arch-chroot /mnt/arch << ARCH_CHROOT_CMDS > /dev/null 2>&1 ln -sf /usr/share/zoneinfo/Europe/Paris /etc/localtime hwclock --systohc sed -i 's/#en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen @@ -449,7 +450,22 @@ ARCH_CHROOT_CMDS } jo_chroot_set_usr() { - + if [ "$isusrsudo" = true ]; then + arch-chroot /mnt/arch << ARCH_CHROOT_CMDS > /dev/null 2>&1 + useradd -m -g wheel -s /bin/$usrshell $usr + passwd $usr +$usrpwd +$usrpwd + sed -i 's/# %wheel ALL=(ALL) ALL/%wheel ALL=(ALL) ALL/' /etc/sudoers +ARCH_CHROOT_CMDS + else + arch-chroot /mnt/arch << ARCH_CHROOT_CMDS + useradd -m -s /bin/$usrshell $usr + passwd $usr +$usrpwd +$usrpwd +ARCH_CHROOT_CMDS + fi } #==================================================================================================# #--------------------------------------------- START ----------------------------------------------# @@ -484,6 +500,8 @@ jo_pacstrap networkmanager if [ "$isusr" = true ]; then if [ "$usrshell" = "zsh" ]; then jo_pacstrap zsh + elif [ "$usrshell" = "dash" ]; then + jo_pacstrap dash fi fi jo_pacstrap os-prober @@ -560,43 +578,8 @@ jo_fstab "IV. INSTALLING LINUX" #------------------------- ARCH-CHROOT --------------------------# #================================================================# jo_chroot_base "V. CONFIGURING LINUX" -jo_chroot_set_usr "V. CONFIGURING LINUX" if [ "$isusr" = true ]; then - if [ "$isusrsudo" = true ]; then - arch-chroot /mnt/arch << ARCH_CHROOT_CMDS - sleep 2 - clear - #===== V. CONFIGURING LINUX ======# - # # - # 9. Generating user # - # # - #=================================# - useradd -m -g wheel -s /bin/$usrshell $usr - passwd $usr -$usrpwd -$usrpwd - sed -i 's/# %wheel ALL=(ALL) ALL/%wheel ALL=(ALL) ALL/' /etc/sudoers - sleep 2 - exit -ARCH_CHROOT_CMDS - else - arch-chroot /mnt/arch << ARCH_CHROOT_CMDS - sleep 2 - clear - #===== V. CONFIGURING LINUX ======# - # # - # 9. Generating user # - # # - #=================================# - useradd -m -s /bin/$usrshell $usr - passwd $usr -$usrpwd -$usrpwd - sed -i 's/# %wheel ALL=(ALL) ALL/%wheel ALL=(ALL) ALL/' /etc/sudoers - sleep 2 - exit -ARCH_CHROOT_CMDS - fi + jo_chroot_set_usr "V. CONFIGURING LINUX" fi if [ "$ltskern" = false ]; then arch-chroot /mnt/arch << ARCH_CHROOT_CMDS |