Support setup-assistant self update

If the user does a full system upgrade using the setup assistant, the setup assistant could end up in a state where it is no longer compatible with its own /usr/lib files.
We can prevent this by making the setup assistant reload itself after a system ugprade. This also allows us to apply updates to the setup assistant without releasing new ISO files.
This commit is contained in:
TotallyNotElite 2020-12-19 20:16:41 +01:00
parent 59af98883b
commit abe5c72c55
1 changed files with 19 additions and 16 deletions

View File

@ -232,26 +232,29 @@ function upgrade2ultimate
fi
}
systemctl --user enable psd >/dev/null 2>&1 &
systemctl --user start psd >/dev/null 2>&1 &
if [ -z "$SETUP_ASSISTANT_SELFUPDATE" ]; then
systemctl --user enable psd >/dev/null 2>&1 &
systemctl --user start psd >/dev/null 2>&1 &
libinput-gestures-setup autostart >/dev/null 2>&1 &
libinput-gestures-setup start >/dev/null 2>&1 &
libinput-gestures-setup autostart >/dev/null 2>&1 &
libinput-gestures-setup start >/dev/null 2>&1 &
while ! isOnline
do
if askYesNoQuestion "update" "Setup Assistant" "update" "No internet connection available, try again?"; then
exit 0
while ! isOnline
do
if askYesNoQuestion "update" "Setup Assistant" "update" "No internet connection available, try again?"; then
exit 0
fi
done
if ! askYesNoQuestion "update" "Setup Assistant" "update" "Do you want to get a recent mirrorlist?"; then
reflector-simple >/dev/null 2>&1
fi
done
if ! askYesNoQuestion "update" "Setup Assistant" "update" "Do you want to get a recent mirrorlist?"; then
reflector-simple >/dev/null 2>&1
fi
if ! askYesNoQuestion "update" "Setup Assistant" "update" "Update the system? (recommended!)"; then
# yy because we may have updated the mirrorlist in the last step
alacritty -e pkexec bash -c "pacman -Syyu; read -p 'Press enter to continue'"
if ! askYesNoQuestion "update" "Setup Assistant" "update" "Update the system? (recommended!)"; then
# yy because we may have updated the mirrorlist in the last step
alacritty -e pkexec bash -c "pacman -Syyu; read -p 'Press enter to continue'"
SETUP_ASSISTANT_SELFUPDATE=1 exec setup-assistant
fi
fi
if ! askYesNoQuestion "update" "Setup Assistant" "update" "Upgrade to Ultimate? (You can select which apps you want!)"; then