+config_unpack(){
+MOUNTDEVICE="$1"
+MESSAGE="$2"
+
+if [ ! -b "$MOUNTDEVICE" ] ; then
+ return;
+fi
+
+
+[ -d /mnt/grml ] || mkdir /mnt/grml
+umount /mnt/grml 1>>$DEBUG 2>&1 # make sure it is not mounted
+mount -o ro -t auto $MOUNTDEVICE /mnt/grml ; RC="$?"
+if [[ $RC == 0 ]]; then
+ einfo "Successfully mounted $MOUNTDEVICE $MESSAGE to /mnt/grml (readonly)." ; eend 0
+ eindent
+ CONFIG=''
+ CONFIG="$(/bin/ls -1d /mnt/grml/[Cc][Oo][Nn][Ff][Ii][Gg].[Tt][Bb][Zz] 2>>$DEBUG)"
+ if checkbootparam config ; then
+ FILENAME="$(getbootparam 'config' 2>>$DEBUG)"
+ if [ -e /mnt/grml/${FILENAME} ] ; then
+ einfo "Using /mnt/grml/$FILENAME instead of config.tbz"
+ CONFIG="/mnt/grml/$FILENAME"
+ fi
+ fi
+ if [ -n "$CONFIG" ]; then
+ einfo "Found file ${WHITE}${CONFIG}${NORMAL} - trying to extract it."
+ cd /
+ unp $CONFIG $EXTRACTOPTIONS ; eend $?
+ else
+ ewarn "Sorry, could not find file $FILENAME on device $MOUNTDEVICE $MESSAGE label GRMLCFG." ; eend 1
+ fi
+
+ SCRIPT=''
+ SCRIPT="$(/bin/ls -1d /mnt/grml/[Gg][Rr][Mm][Ll].[Ss][Hh] 2>>$DEBUG)"
+ if [ -n "$SCRIPT" ]; then
+ einfo "Found script ${WHITE}${SCRIPT}${NORMAL} - trying to execute it."
+ $SCRIPT ; eend $?
+ fi
+ eoutdent
+ else
+ einfo "Could not mount $MOUNTDEVICE to /mnt/grml - sorry." ; eend 1
+fi # mount $MOUNTDEVICE
+grep -q '/mnt/grml' /proc/mounts && umount /mnt/grml
+
+}
+