fix of root installing with packer
This commit is contained in:
parent
038ef790fa
commit
3cf1a42252
2 changed files with 6 additions and 3 deletions
|
@ -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 <OK> and the system will begin installation!" 13 60
|
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 <OK> and the system will begin installation!" 13 60
|
||||||
blue Now installing main programs...
|
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)
|
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
|
fi
|
||||||
|
|
||||||
for choice in $choices
|
for choice in $choices
|
||||||
|
@ -90,11 +92,13 @@ done
|
||||||
|
|
||||||
if [[ -e .firstrun ]]
|
if [[ -e .firstrun ]]
|
||||||
then
|
then
|
||||||
|
USER=$(cat .firstrun)
|
||||||
blue Downloading next portion of the script \(user.sh\)...
|
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...
|
sudo -u $USER bash /home/$USER/user.sh || red Error when running user.sh...
|
||||||
rm /home/$USER/user.sh
|
rm /home/$USER/user.sh
|
||||||
else
|
else
|
||||||
|
USER=$(cat .name)
|
||||||
blue Downloading next portion of the script \(aur_packages.sh\)...
|
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)...
|
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...
|
sudo -u $USER bash /home/$USER/aur_packages.sh || red Error when running aur_packages...
|
||||||
|
|
3
root.sh
3
root.sh
|
@ -19,7 +19,6 @@ do
|
||||||
done
|
done
|
||||||
|
|
||||||
USER=$(cat name)
|
USER=$(cat name)
|
||||||
rm name
|
|
||||||
useradd -m -g wheel -s /bin/bash $USER
|
useradd -m -g wheel -s /bin/bash $USER
|
||||||
|
|
||||||
echo "$USER:$(cat pass1)" | chpasswd
|
echo "$USER:$(cat pass1)" | chpasswd
|
||||||
|
@ -27,7 +26,7 @@ echo "$USER:$(cat pass1)" | chpasswd
|
||||||
shred -u pass1
|
shred -u pass1
|
||||||
shred -u pass2
|
shred -u pass2
|
||||||
|
|
||||||
touch .firstrun
|
echo $USER > .firstrun
|
||||||
curl -O http://lukesmith.xyz/larbs/install_packages.sh && bash install_packages.sh
|
curl -O http://lukesmith.xyz/larbs/install_packages.sh && bash install_packages.sh
|
||||||
rm .firstrun
|
rm .firstrun
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue