1
0
mirror of https://gitlab.com/JKANetwork/JKArch.git synced 2026-02-19 19:51:32 +01:00

Fix bug with sudo command

This commit is contained in:
Kevin Puertas
2017-08-29 17:10:54 +02:00
parent 353697e9ed
commit 9557226f15

View File

@@ -68,7 +68,7 @@ function pacmanerror {
fi fi
} }
##This function logs and execute commands ##This function execute the commands
function execl { function execl {
local command local command
if [[ $1 != "chroot" && $1 != "chuser" ]];then #If it runs normally if [[ $1 != "chroot" && $1 != "chuser" ]];then #If it runs normally
@@ -81,7 +81,6 @@ function execl {
chroot /mnt /bin/bash -c "su $nameuser -c \"$command\" " chroot /mnt /bin/bash -c "su $nameuser -c \"$command\" "
fi fi
fi fi
} }
##Function for show to the user if an option is on or off ##Function for show to the user if an option is on or off
@@ -624,37 +623,37 @@ if [[ ! -f "jkarch" ]];then
chmod +x installer.sh chmod +x installer.sh
# Grow cowspace # Grow cowspace
showdo "Grow cowspace for installer" showdo "Grow cowspace for installer"
execl sudo mount -o remount,size=700M /run/archiso/cowspace execl mount -o remount,size=700M /run/archiso/cowspace
#Enable pacman #Enable pacman
showdo "Configuring pacman" "1" showdo "Configuring pacman" "1"
execl sudo pacman-key --init execl pacman-key --init
execl sudo pacman-key --populate execl pacman-key --populate
execl sudo pacman -Sy archlinux-keyring --noconfirm execl pacman -Sy archlinux-keyring --noconfirm
showdo "Configuring pacman" "2" showdo "Configuring pacman" "2"
showdo "Updating mirrors" "1" showdo "Updating mirrors" "1"
execl sudo pacman -S reflector --noconfirm execl pacman -S reflector --noconfirm
execl sudo reflector --verbose -l 6 --sort rate --save /etc/pacman.d/mirrorlist execl reflector --verbose -l 6 --sort rate --save /etc/pacman.d/mirrorlist
showdo "Updated mirrors" "2" showdo "Updated mirrors" "2"
#Delete programs (For not updating it) #Delete programs (For not updating it)
sudo pacman -R clonezilla darkhttpd diffutils grml-zsh-config irssi linux-atm lvm2 man-db man-pages mc ndisc6 nmap smartmontools testdisk vi vim vim-runtime openconnect pcsclite python2 python reflector --noconfirm pacman -R clonezilla darkhttpd diffutils grml-zsh-config irssi linux-atm lvm2 man-db man-pages mc ndisc6 nmap smartmontools testdisk vi vim vim-runtime openconnect pcsclite python2 python reflector --noconfirm
sudo rm -rf /var/cache/pacman/pkg/* rm -rf /var/cache/pacman/pkg/*
#Needed progs (gparted) #Needed progs (gparted)
sudo pacman -S gparted xf86-video-vesa xorg-xinit lwm xorg-xrandr xterm --noconfirm pacman -S gparted xf86-video-vesa xorg-xinit lwm xorg-xrandr xterm --noconfirm
sudo rm -rf /var/cache/pacman/pkg/* rm -rf /var/cache/pacman/pkg/*
#Update progs #Update progs
sudo pacman -Su --noconfirm --ignore linux #Do not upgrade kernel automatically pacman -Su --noconfirm --ignore linux #Do not upgrade kernel automatically
sudo rm -rf /var/cache/pacman/pkg/* rm -rf /var/cache/pacman/pkg/*
sudo rm /etc/X11/xinit/xinitrc rm /etc/X11/xinit/xinitrc
sudo touch /etc/X11/xinit/xinitrc touch /etc/X11/xinit/xinitrc
sudo chmod 777 /etc/X11/xinit/xinitrc chmod 777 /etc/X11/xinit/xinitrc
sudo echo "#Start gparted with startx command" > /etc/X11/xinit/xinitrc echo "#Start gparted with startx command" > /etc/X11/xinit/xinitrc
sudo echo "lwm &" >> /etc/X11/xinit/xinitrc echo "lwm &" >> /etc/X11/xinit/xinitrc
sudo echo "xrandr -s 1024x768 -r 60" >> /etc/X11/xinit/xinitrc echo "xrandr -s 1024x768 -r 60" >> /etc/X11/xinit/xinitrc
sudo echo "xterm -e '/root/installer.sh' -geometry 120x35" >> /etc/X11/xinit/xinitrc echo "xterm -e '/root/installer.sh' -geometry 120x35" >> /etc/X11/xinit/xinitrc
sudo chmod 644 /etc/X11/xinit/xinitrc chmod 644 /etc/X11/xinit/xinitrc
sudo rm -rf /var/cache/pacman/pkg/* rm -rf /var/cache/pacman/pkg/*
#Download translations #Download translations
wget -nv https://gitlab.com/JKANetwork/JKArch/raw/master/installer/translations.sh -O /root/translations.sh wget -nv https://gitlab.com/JKANetwork/JKArch/raw/master/installer/translations.sh -O /root/translations.sh