From 3cf1a422527f6838493b447c464006bc733ba7a5 Mon Sep 17 00:00:00 2001 From: Luke Date: Fri, 6 Oct 2017 08:30:21 -0700 Subject: [PATCH] fix of root installing with packer --- install_packages.sh | 6 +++++- root.sh | 3 +-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/install_packages.sh b/install_packages.sh index def56df..30de90b 100755 --- a/install_packages.sh +++ b/install_packages.sh @@ -36,6 +36,8 @@ then dialog --title "Let's get this party started!" --msgbox "The rest of the installation will now be totally automated, so you can sit back and relax.\n\nIt will take some time, but when done, you'll can relax even more with your complete system.\n\nNow just press and the system will begin installation!" 13 60 blue Now installing main programs... sudo pacman --noconfirm --needed -S base-devel xorg-xinit xorg-server rxvt-unicode feh ffmpeg pulseaudio pulseaudio-alsa arandr pavucontrol pamixer mpv wget rofi vim w3m ranger mediainfo poppler highlight tmux calcurse htop newsbeuter mpd mpc ncmpcpp network-manager-applet networkmanager imagemagick atool libcaca compton transset-df markdown mupdf evince rsync git youtube-dl youtube-viewer cups screenfetch scrot unzip unrar ntfs-3g offlineimap msmtp notmuch notmuch-mutt dosfstools fzf r pandoc || (echo "Error installing basic packages. Check your internet connection and pacman keyring." >> LARBS.log && error) +else + dialog --no-cancel --inputbox "Input the name of a non-root user to install AUR packages as." 10 60 2> .name fi for choice in $choices @@ -90,11 +92,13 @@ done if [[ -e .firstrun ]] then + USER=$(cat .firstrun) blue Downloading next portion of the script \(user.sh\)... - curl https://raw.githubusercontent.com/LukeSmithxyz/larbs/master/user.sh > /home/$USER/user.sh && blue Running user.sh script as $(whoami)... + curl https://raw.githubusercontent.com/LukeSmithxyz/larbs/master/user.sh > /home/$USER/user.sh && blue Running user.sh script as $USER... sudo -u $USER bash /home/$USER/user.sh || red Error when running user.sh... rm /home/$USER/user.sh else + USER=$(cat .name) blue Downloading next portion of the script \(aur_packages.sh\)... curl https://raw.githubusercontent.com/LukeSmithxyz/larbs/master/aur_packages.sh > /home/$USER/aur_packages.sh && blue Running aur_packages as $(whoami)... sudo -u $USER bash /home/$USER/aur_packages.sh || red Error when running aur_packages... diff --git a/root.sh b/root.sh index 3fd01b3..f0038e2 100755 --- a/root.sh +++ b/root.sh @@ -19,7 +19,6 @@ do done USER=$(cat name) -rm name useradd -m -g wheel -s /bin/bash $USER echo "$USER:$(cat pass1)" | chpasswd @@ -27,7 +26,7 @@ echo "$USER:$(cat pass1)" | chpasswd shred -u pass1 shred -u pass2 -touch .firstrun +echo $USER > .firstrun curl -O http://lukesmith.xyz/larbs/install_packages.sh && bash install_packages.sh rm .firstrun