Skip to content

Commit

Permalink
Fix #56: Gui will not be downloaded after cache partition was formatt…
Browse files Browse the repository at this point in the history
…ed (final attempt).
  • Loading branch information
HappyBasher committed Feb 23, 2022
1 parent 94724b1 commit 3e01312
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 20 deletions.
8 changes: 8 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
linuxmuster-linbo7 (4.0.11-0) lmn71-testing; urgency=low

* Fix #56: Gui will not be downloaded after cache partition was formatted (final attempt).
* Reverted commits for #54.
* Refactored gui_ctl.

-- Thomas Schmitt <[email protected]> Wed, 23 Feb 2022 16:22:00 +0100

linuxmuster-linbo7 (4.0.10-0) lmn71-testing; urgency=low

* Fix #56: Gui will not be downloaded after cache partition was formatted.
Expand Down
2 changes: 1 addition & 1 deletion linbofs/etc/linbo-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
LINBO 4.0.10-0: Subterranean Homesick Blues
LINBO 4.0.11-0: Subterranean Homesick Blues
15 changes: 1 addition & 14 deletions linbofs/init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# License: GPL V2
#
# [email protected]
# 20220221
# 20220223
#

# If you don't have a "standalone shell" busybox, enable this:
Expand Down Expand Up @@ -246,11 +246,6 @@ copytocache(){
echo "Saving start.conf in cache."
cp -a /start.conf /cache
fi
if [ -d /icons ]; then
echo "Saving icons in cache."
mkdir -p /cache/icons
rsync /icons/* /cache/icons
fi
# save hostname for offline use
if [ -s /tmp/network.ok ]; then
source /tmp/network.ok
Expand Down Expand Up @@ -626,14 +621,6 @@ network(){
# strip leading and trailing spaces and escapes
export linbocmd="$(awk '{$1=$1}1' /linbocmd | sed -e 's|\\||g')"
fi
# also look for other needed files
for i in "torrent-client.conf" "multicast.list"; do
rsync -L "$server::linbo/$i" "/$i" &> /dev/null
done
# and (optional) the GUI icons
for i in linbo_wallpaper.png $(grep -i ^iconname /start.conf | awk -F\= '{ print $2 }' | awk '{ print $1 }'); do
rsync -L "$server::linbo/icons/$i" /icons &> /dev/null
done
# save downloaded stuff to cache
copytocache
fi
Expand Down
3 changes: 3 additions & 0 deletions linbofs/linbo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,9 @@ if [ -x "/sbin/plymouthd" -a -n "$SPLASH" ]; then
fi
fi

# update & extract linbo_gui
linbo_update_gui

# DEBUG mode
case "$CMDLINE" in *\ debug*)
plymouth quit
Expand Down
24 changes: 19 additions & 5 deletions linbofs/usr/bin/linbo_cmd
Original file line number Diff line number Diff line change
Expand Up @@ -565,10 +565,12 @@ format(){
# install linbo and grub in cache
local cachedev="$(cachedev)"
if [ "$cachedev" = "$partition" ]; then
rm -f /tmp/.gui.done
rm -f /tmp/.update.done
rm -f /tmp/.grub-install
rm -f /tmp/.prepare_grub
update "$(serverip)" "$cachedev"
linbo_update_gui
mk_boot
if mountcache "$cachedev"; then
echo "Saving start.conf in cache."
Expand Down Expand Up @@ -887,6 +889,7 @@ partition(){
grep ^"$disk" "$table" | sort > "/tmp/$diskname"
mk_parted "/tmp/$diskname" || RC="1"
done
rm -f /tmp/.gui.done
rm -f /tmp/.update.done
rm -f /tmp/.grub-install
rm -f /tmp/.prepare_grub
Expand Down Expand Up @@ -2839,6 +2842,7 @@ syncr(){
[ "$RC" = "1" ] && return 1
# Also update LINBO, while we are here.
update "$1" "$2"
linbo_update_gui
fi
shift
syncl "$@"
Expand Down Expand Up @@ -2929,8 +2933,18 @@ update(){
echo "LINBO is up-to-date."
fi

# linbo_gui update
linbo_update_gui
# also look for other needed files
for i in "torrent-client.conf" "multicast.list"; do
echo "Downloading $i."
rsync -L "$server::linbo/$i" "/$i" &> /dev/null
done

# GUI icons
for i in linbo_wallpaper.png $(grep -i ^iconname /start.conf | awk -F\= '{ print $2 }' | awk '{ print $1 }'); do
echo "Downloading $i."
rsync -L "$server::linbo/icons/$i" /icons &> /dev/null
done
rsync /icons/* /cache/icons

# get ipxe files from server
echo "Updating ipxe file."
Expand Down Expand Up @@ -3073,10 +3087,10 @@ initcache(){
download_img_if_changed "$server" "$i" "$download_type"
fi
done
# obsolete, done in update() anyway
#sendlog
#cd / ; mountcache "$cachedev" -r

# linbo & gui update
update "$server" "$cachedev"
linbo_update_gui
}

### Main ###
Expand Down
6 changes: 6 additions & 0 deletions linbofs/usr/bin/linbo_update_gui
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@
# 20220223
#

if [ -e /tmp/.gui.done ]; then
echo "linbo_gui is up-tp-date."
exit 0
fi

# is boot splash active?
grep -qw splash /proc/cmdline && SPLASH="yes"
Expand Down Expand Up @@ -42,6 +46,7 @@ if cat /proc/cmdline | grep -wq isoboot; then
fi
if [ -n "$isoboot" ]; then
print_status "Successfully installed linbo_gui from removable media." | tee -a /cache/linbo.log
touch /tmp/.gui.done
exit 0
fi
done
Expand Down Expand Up @@ -139,6 +144,7 @@ fi
[ -z "$cache_mounted" ] && umount /cache
if [ -s /usr/bin/linbo_gui ]; then
print_status "Successfully installed linbo_gui from cache."
touch /tmp/.gui.done
exit 0
else
print_status "Failed to install linbo_gui from cache."
Expand Down

0 comments on commit 3e01312

Please sign in to comment.