- Wait for network for all aeon-mig-firstboot tasks

OBS-URL: https://build.opensuse.org/package/show/devel:microos:aeon/gnome-branding-Aeon?expand=0&rev=19
This commit is contained in:
Richard Brown 2024-05-23 20:00:57 +00:00 committed by Git OBS Bridge
parent 403910266d
commit 34b43ac08f
3 changed files with 18 additions and 4 deletions

View File

@ -23,6 +23,10 @@ installFlatpakPackage(){
fi fi
} }
waitforNet(){
until /usr/bin/curl -s --max-time 5 https://flathub.org > /dev/null; do sleep 1; done
}
defaultOptions() { defaultOptions() {
pkgs=("org.mozilla.firefox" "org.gnome.Calculator" "org.gnome.TextEditor") pkgs=("org.mozilla.firefox" "org.gnome.Calculator" "org.gnome.TextEditor")
} }
@ -100,7 +104,7 @@ show_progress() {
( (
sleep 1 sleep 1
echo "# Waiting for Internet connection" echo "# Waiting for Internet connection"
until /usr/bin/curl -s --max-time 5 https://flathub.org > /dev/null; do sleep 1; done waitforNet
while /usr/bin/pgrep -f '/usr/bin/flatpak|/usr/sbin/transactional-update|/usr/bin/pkexec' >/dev/null; do while /usr/bin/pgrep -f '/usr/bin/flatpak|/usr/sbin/transactional-update|/usr/bin/pkexec' >/dev/null; do
echo "# Installing Packages" echo "# Installing Packages"
sleep 1 sleep 1
@ -125,7 +129,7 @@ install_locale() {
} }
run_tasks() { run_tasks() {
until /usr/bin/curl -s --max-time 5 https://flathub.org > /dev/null; do sleep 1; done waitforNet
if [[ -n "${need_locale}" ]]; then if [[ -n "${need_locale}" ]]; then
install_locale & install_locale &
fi fi

View File

@ -11,7 +11,7 @@ show_progress() {
( (
sleep 1 sleep 1
echo "# Waiting for Internet connection" echo "# Waiting for Internet connection"
until /usr/bin/curl -s --max-time 5 https://flathub.org > /dev/null; do sleep 1; done waitforNet
while /usr/bin/pgrep -f '/usr/bin/flatpak|/usr/sbin/transactional-update|/usr/bin/pkexec' >/dev/null; do while /usr/bin/pgrep -f '/usr/bin/flatpak|/usr/sbin/transactional-update|/usr/bin/pkexec' >/dev/null; do
echo "# Tuning Installation" echo "# Tuning Installation"
sleep 1 sleep 1
@ -20,7 +20,7 @@ show_progress() {
} }
installFlatpakRepo(){ installFlatpakRepo(){
until /usr/bin/curl -s --max-time 5 https://flathub.org > /dev/null; do sleep 1; done waitforNet
/usr/bin/flatpak remote-add --user --if-not-exists flathub /usr/share/aeon/flathub.flatpakrepo /usr/bin/flatpak remote-add --user --if-not-exists flathub /usr/share/aeon/flathub.flatpakrepo
if [ "$?" != 0 ] ; then if [ "$?" != 0 ] ; then
zenity --error \ zenity --error \
@ -30,6 +30,7 @@ installFlatpakRepo(){
} }
install_locale() { install_locale() {
waitforNet
pkexec sh -c "/usr/sbin/transactional-update -n run zypper -n aloc ${LANG} && /usr/sbin/transactional-update -n apply" pkexec sh -c "/usr/sbin/transactional-update -n run zypper -n aloc ${LANG} && /usr/sbin/transactional-update -n apply"
if [ "$?" != 0 ] ; then if [ "$?" != 0 ] ; then
zenity --error \ zenity --error \
@ -46,6 +47,10 @@ lastMSG() {
rm ~/.config/autostart/aeon-mig-firstboot.desktop rm ~/.config/autostart/aeon-mig-firstboot.desktop
} }
waitforNet(){
until /usr/bin/curl -s --max-time 5 https://flathub.org > /dev/null; do sleep 1; done
}
firstMSG firstMSG
installFlatpakRepo & installFlatpakRepo &
if [[ ! "${LANG}" =~ ^en_ ]]; then if [[ ! "${LANG}" =~ ^en_ ]]; then

View File

@ -1,3 +1,8 @@
-------------------------------------------------------------------
Thu May 23 20:00:38 UTC 2024 - Richard Brown <rbrown@suse.com>
- Wait for network for all aeon-mig-firstboot tasks
------------------------------------------------------------------- -------------------------------------------------------------------
Thu May 23 16:05:53 UTC 2024 - Richard Brown <rbrown@suse.com> Thu May 23 16:05:53 UTC 2024 - Richard Brown <rbrown@suse.com>