]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - config/rootfiles/core/38/update.sh
Core38 updater: fix wait for pakfire end.
[ipfire-2.x.git] / config / rootfiles / core / 38 / update.sh
index 9af7aad156cea769e8bc2c620589e2b869a527d2..f15ea1f3a39314254ffd112137f6a8a7c9a9e3c3 100644 (file)
@@ -237,7 +237,26 @@ chmod 644 /etc/sysconfig/modules
 #
 sed -i "s|$OLDVERSION|$NEWVERSION|g" /opt/pakfire/etc/pakfire.conf
 #
-# This core-update need a reboot
-/usr/bin/logger -p syslog.emerg -t core-upgrade-38 "Upgrade finished. If you use a customized grub.cfg"
-/usr/bin/logger -p syslog.emerg -t core-upgrade-38 "Check it before reboot !!!"
-/usr/bin/logger -p syslog.emerg -t core-upgrade-38 " *** Please reboot... *** "
+# After pakfire has ended run it again and update the lists and do upgrade
+#
+echo '#!/bin/bash'                                        >  /tmp/pak_update
+echo 'while [ "$(ps -A | grep " update.sh")" != "" ]; do' >> /tmp/pak_update
+echo '    sleep 1'                                        >> /tmp/pak_update
+echo 'done'                                               >> /tmp/pak_update
+echo 'while [ "$(ps -A | grep " pakfire")" != "" ]; do'   >> /tmp/pak_update
+echo '    sleep 1'                                        >> /tmp/pak_update
+echo 'done'                                               >> /tmp/pak_update
+echo '/opt/pakfire/pakfire update -y --force'             >> /tmp/pak_update
+echo '/opt/pakfire/pakfire upgrade -y'                    >> /tmp/pak_update
+echo '/opt/pakfire/pakfire upgrade -y'                    >> /tmp/pak_update
+echo '/opt/pakfire/pakfire upgrade -y'                    >> /tmp/pak_update
+echo '/usr/bin/logger -p syslog.emerg -t core-upgrade-38 "Upgrade finished. If you use a customized grub.cfg"' >> /tmp/pak_update
+echo '/usr/bin/logger -p syslog.emerg -t core-upgrade-38 "Check it before reboot !!!"' >> /tmp/pak_update
+echo '/usr/bin/logger -p syslog.emerg -t core-upgrade-38 " *** Please reboot... *** "' >> /tmp/pak_update
+#
+chmod +x /tmp/pak_update
+/tmp/pak_update &
+#
+echo
+echo Please wait until pakfire has ended...
+echo