Wenn man z.B. aus Geschwindigkeitsgründen ein „Sync+Start“ vermeiden will, aber auf ein „postsync“-Skript nicht verzichten will, kann man folgendes tun:
Veränderungen am Kern von Linbo. Jegliche Handlung auf eigene Gewähr und vermutlich ohne support durch die Entwickler. Funktioniert nur mit Linbo 2.3.14 und vielleicht mit neueren.
You have been warned.
/var/cache/linuxmuster-linbo/linbofs64/usr/bin/linbo_cmd z.B. nach: # cp /var/cache/linuxmuster-linbo/linbofs64/usr/bin/linbo_cmd /var/linbo/my_linbo_cmd
/var/linbo/my_linbo_cmd und suche die Zeilen start(){
...
# sets machine password on server
invoke_macct
# kill torrents if any
killalltorrents
...
invoke_macct die Zeilen ein: # do a postsync on start, if configured with PostsyncOnStart=yes in next line after baseimage=${image}.cloop line
# does NOT do all the windows/linux stuff: restore bcd,gpt,registry and newdev.dll-patching,
image="$(cat /mnt/.linbo)"
postsync="$image.cloop.postsync"
local RET=""
RET="$(grep -i "baseimage[[:space:]]*=[[:space:]]*${image}.cloop" -A 1 /start.conf | grep -i ^postsynconstart | tail -1 | awk -F= '{ print $2 }' | awk '{ print $1 }' | tr A-Z a-z)"
if [ "x$RET" = "xyes" ]; then
echo "do a postsync anyway"
# source postsync script
[ -s "/cache/$postsync" ] && . "/cache/$postsync"
sync; sync; sleep 1
fi
/usr/share/linuxmuster-linbo/update-linbofs.sh an der folgenden Stelle (ca. Zeile 100) die „postsynconstart“ und nachfolgende Zeile ein: ...
# copy default start.conf
cp -f $LINBODIR/start.conf .
#postsynconstart
cp /var/linbo/my_linbo_cmd $linbofscachedir/usr/bin/linbo_cmd
# pack default linbofs${suffix}.lz again
find . | cpio --quiet -o -H newc | lzma -zcv > "$linbofs" ; RC="$?"
[ $RC -ne 0 ] && bailout "failed!"
...
update-linbofs die eigene my_linbo_cmd als neue linbo_cmd ins LINBO kopiert wird. D.h. eigentlich ist diese Aktion nur einmal notwendig. Danach würde das linbo_cmd aus dem bestehenden Image nicht verändert (außer linuxmuster-linbo wird neu heruntergeladen). Also kann die letzte Änderung von update-linbofs.sh nach dem ersten update-linbofs wieder herausgenommen werden.start.conf.<hwk> direkt nach der Zeile baseimage=meinimage.cloop die Zeile PostSyncOnStart = yes
ein.
update-linbofs aus.# grep -i postsynconstart /usr/bin/linbo_cmd, ob der Hack funktioniert hat# linbo_wrapper start:1 und beobachte den Output. Alles was dein Postsync-Skript als output erzeugt, sollte kurz vor dem STart sichtbar werden.