Skip to content

Commit

Permalink
Fix linbo_gui theming update in linbo_cmd.
Browse files Browse the repository at this point in the history
  • Loading branch information
HappyBasher committed Oct 4, 2022
1 parent a7b88ff commit 4afe1e4
Showing 1 changed file with 25 additions and 13 deletions.
38 changes: 25 additions & 13 deletions linbofs/usr/bin/linbo_cmd
Expand Up @@ -6,7 +6,7 @@
# ssd/4k/8k support - jonny@bzt.de 06.11.2012 anpassung fuer 2.0.12
#
# thomas@linuxmuster.net
# 20220920
# 20221004
# GPL v3
#

Expand Down Expand Up @@ -2922,27 +2922,38 @@ update(){
echo "LINBO is up-to-date."
fi

# also look for other needed files
# update torrent files
echo "Downloading torrent and multicast control 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
# update gui files
mkdir -p /cache/icons
echo "Updating linbo_gui theming stuff."
linbo_gui_icons=$(grep -i ^iconname /start.conf | awk -F\= '{ print $2 }' | awk '{ print $1 }')
linbo_gui_themefile=$(grep -m1 -i ^themeconffile ./start.conf | awk -F\= '{ print $2 }' | awk '{ print $1 }')
for i in $linbo_gui_icons $linbo_gui_themefile; do
rsync -L "$server::linbo/icons/$i" /cache/icons &> /dev/null
done
rsync /icons/* /cache/icons
if [ -s /cache/icons/$linbo_gui_themefile ]; then
# if there is a themefile -> download all resources required for that theme
linbo_gui_theme_icons=$(sed -e '1,/^\[icons\]/ d' /icons/$linbo_gui_themefile | sed -e '/^\[.*\]/q' | sed '$d' | sed '/^$/d' | awk -F\= '{ print $2 }' | awk '{ print $1 }')
for i in $linbo_gui_theme_icons; do
rsync -L "$server::linbo/icons/$i" /cache/icons &> /dev/null
done
fi
mkdir -p /icons
rsync /cache/icons/* /icons

# get ipxe files from server
# update ipxe files
echo "Updating ipxe file."
case "$(systemtype)" in
efi*) download "$server" boot/grub/ipxe.efi ;;
*) download "$server" boot/grub/ipxe.lkrn ;;
esac

# get grub configs from server
# update common grub configs
echo "Updating common grub configuration."
cfgfile="$myname.$group.grub.cfg"
if download "$server" "boot/grub/spool/$cfgfile"; then
Expand All @@ -2951,7 +2962,7 @@ update(){
echo "grub.cfg was updated."
fi

# get host or group specific grub config from server
# update host or group specific grub configs
echo "Updating host and group specific grub configuration."
for i in "boot/grub/hostcfg/$myname.cfg" "boot/grub/$group.cfg"; do
if download "$server" "$i"; then
Expand All @@ -2963,7 +2974,7 @@ update(){
fi
done

# keep grub themes also updated
# update grub themes
echo -n "Updating grub themes ... "
themesdir="/boot/grub/themes"
mkdir -p "/cache$themesdir"
Expand All @@ -2975,7 +2986,7 @@ update(){
echo "OK!"
fi

# fetch also current linuxmuster-win scripts
# update linuxmuster-win scripts
echo -n "Updating linuxmuster-win ... "
[ -d /cache/linuxmuster-win ] || mkdir -p /cache/linuxmuster-win
rsync -a --exclude=*.ex --delete --delete-excluded "$server::linbo/linuxmuster-win/" /cache/linuxmuster-win/ || RC=1
Expand All @@ -2985,6 +2996,7 @@ update(){
else
echo "OK!"
fi

# unix2dos and sambadomain fix
[ -s /cache/hostname ] && sambadomain="$(awk -F\. '{print $2}' /cache/hostname | tr a-z A-Z)"
for i in /cache/linuxmuster-win/*.reg; do
Expand Down

0 comments on commit 4afe1e4

Please sign in to comment.