From a3b9c1c3e5e68ba7010115ab9e70183f115f1f1e Mon Sep 17 00:00:00 2001 From: lemniskett Date: Sun, 8 Nov 2020 22:36:35 +0700 Subject: [PATCH] Remove username input --- archbox.bash | 1 + archbox.conf | 2 +- chroot_setup.bash | 3 +-- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/archbox.bash b/archbox.bash index f3812ad..b980f85 100755 --- a/archbox.bash +++ b/archbox.bash @@ -77,6 +77,7 @@ case $1 in mount -R /lib/modules $CHROOT/lib/modules mount -R /boot $CHROOT/boot cp /usr/local/share/archbox/chroot_setup.bash $CHROOT/chroot_setup + echo $USER > /tmp/archbox_user chroot $CHROOT /bin/bash -c "sh /chroot_setup" ;; -e|--enter) diff --git a/archbox.conf b/archbox.conf index 5e77f64..4214840 100644 --- a/archbox.conf +++ b/archbox.conf @@ -1,4 +1,4 @@ -USER=lemniskett +USER="lemniskett" PRIV="sudo" INSTALL_PATH="/var/archlinux" CHROOT="$INSTALL_PATH/root.x86_64" diff --git a/chroot_setup.bash b/chroot_setup.bash index 3ce178c..3e81f3f 100755 --- a/chroot_setup.bash +++ b/chroot_setup.bash @@ -15,8 +15,7 @@ pacman-key --populate archlinux msg "Installing essential packages..." pacman -Syu base base-devel xorg pulseaudio --noconfirm msg "Creating user account..." -echo "Enter the name of the user account, you may want it to be the same as the host os so it will share the same home directory" -read CHROOT_USER +CHROOT_USER="$(cat /tmp/archbox_user)" useradd -m $CHROOT_USER gpasswd -a $CHROOT_USER wheel echo "Enter root password"