# Determine if there is an ISO image to loop-mount: export TEXTDOMAIN=slint check_iso_image () { local IDIR=$1 local MNTDIR=$2 [ ! -d $IDIR ] && return 1 [ -z "$MNTDIR" ] && MNTDIR=/var/log/mount SLINTVERSION=$(sed -n "s/Slint version: //p" /.target) SFX=$(sed -n "s/System: //p" /.target) IISO=$(ls --indicator-style=none "$IDIR"/slint${SFX}-${SLINTVERSION}.iso 2>/dev/null |tail -1) if [ -n "$IISO" ]; then gettext "An ISO image of Slint's install DVD was found. Do you want me to mount the ISO image and use this as the package source?" > $TMP/tempmsg dialog --title "`gettext "USE ISO IMAGE"`" --yesno "`cat $TMP/tempmsg`" 9 80 RET=$? if [ ! $RET = 0 ]; then rm -f $TMP/tempmsg return 1 fi rm -f $TMP/tempmsg umount -f $MNTDIR 2>/dev/null mkdir -p $MNTDIR mount -o loop,ro $IISO $MNTDIR else return 1 fi }