I got some code used to change the current wallpaper at boot up.
When executing this code from within a script in /root/Startup, it works as it is supposed to do.
But when inserting into the init script of the initrd.gz, it causes a Kernel Panic!
Here is the code (snippet) (the Line that causes Kernel Panic is marked up):
As soon as I'm commenting out the Line OLDWP2=${OLDWP:1:nlen-2} there is NO Kernel Panic and the Puppy boots straight up - as is should do. But the script (function) won't work then.read OLDWP_LINE < /etc/Puppybackgroundpicture-orig
OLDWP=$(echo $OLDWP_LINE|cut -d' ' -f2)
echo -n "$OLDWP" > /tmp/Puppybackgroundpicture
read OLDWP < /tmp/Puppybackgroundpicture
nlen="`echo ${#OLDWP}`"
OLDWP2=${OLDWP:1:nlen-2}
NEWWP2="/usr/share/backgrounds/$MYWALLPAPER"
Any hints?