mirror of
https://gitlab.com/JKANetwork/JKArch.git
synced 2026-02-19 19:51:32 +01:00
More bug fixes
This commit is contained in:
@@ -46,10 +46,10 @@ fatalerror "$(T "Pacman error, problems in repositories, apologizes. You have to
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
function execl { ##This function logs the command executed
|
function execl { ##This function logs and execute commands
|
||||||
local command
|
local command
|
||||||
echo "------" >> "/tmp/install.log"
|
echo "------" >> "/tmp/install.log"
|
||||||
if [[ $1 != "chroot" ]];then #If it runs outside chroot
|
if [[ $1 != "chroot" && $1 != "chuser" ]];then #If it runs normally
|
||||||
command="$1"
|
command="$1"
|
||||||
for (( i=2; i<=$#; i++ ))
|
for (( i=2; i<=$#; i++ ))
|
||||||
do
|
do
|
||||||
@@ -57,19 +57,26 @@ do
|
|||||||
done
|
done
|
||||||
echo "$command" >> "/tmp/install.log"
|
echo "$command" >> "/tmp/install.log"
|
||||||
$command
|
$command
|
||||||
else #else: If it runs in chroot
|
else #There is a "First word", avoid it
|
||||||
for (( i=2; i<=$#; i++ ))
|
for (( i=2; i<=$#; i++ ))
|
||||||
do
|
do
|
||||||
command="$command $(echo $* | cut -f$i -d" ")"
|
command="$command $(echo $* | cut -f$i -d" ")"
|
||||||
done
|
done
|
||||||
echo "(In the install partition/chroot) $command" >> "/tmp/install.log"
|
|
||||||
chroot /mnt /bin/bash -c "$command"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ $1 = "chroot" ]];then #If it runs in chroot
|
||||||
|
echo "(In the install partition/chroot) $command" >> "/tmp/install.log"
|
||||||
|
chroot /mnt /bin/bash -c "$command"
|
||||||
|
elif [[ $1 = "chuser" ]];then #If it has to run in chroot but in the user name
|
||||||
|
echo "(In a 'user' chroot in install partition) $command" >> "/tmp/install.log"
|
||||||
|
chroot /mnt /bin/bash -c "su $nameuser -c \"$command\" "
|
||||||
|
fi
|
||||||
|
|
||||||
|
#Log result of the command
|
||||||
if [[ $? == 0 ]];then
|
if [[ $? == 0 ]];then
|
||||||
echo "Result Ok " >> "/tmp/install.log"
|
echo "Result Ok " >> "/tmp/install.log"
|
||||||
else
|
else
|
||||||
echo "Result Error: Code $?" >> "/tmp/install.log"
|
echo "Error: Code $?" >> "/tmp/install.log"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -601,7 +608,7 @@ if [[ $nooptprogs != "1" ]];then
|
|||||||
execl chroot pacman -S $packages --noconfirm --needed
|
execl chroot pacman -S $packages --noconfirm --needed
|
||||||
if [[ $inswine = 1 ]];then
|
if [[ $inswine = 1 ]];then
|
||||||
echo "$(T "Configuring wine for better experience") (32 bit winearch)"
|
echo "$(T "Configuring wine for better experience") (32 bit winearch)"
|
||||||
execl chroot su $nameuser -c 'WINEARCH=win32 wineboot -u'
|
execl chuser WINEARCH=win32 wineboot -u
|
||||||
fi
|
fi
|
||||||
packages=""
|
packages=""
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user