diff options
Diffstat (limited to 'source/installer/sources/initrd/usr/lib/setup/INCISO')
-rwxr-xr-x | source/installer/sources/initrd/usr/lib/setup/INCISO | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/source/installer/sources/initrd/usr/lib/setup/INCISO b/source/installer/sources/initrd/usr/lib/setup/INCISO new file mode 100755 index 00000000..e34076c0 --- /dev/null +++ b/source/installer/sources/initrd/usr/lib/setup/INCISO @@ -0,0 +1,31 @@ +# Determine if there is an ISO image to loop-mount: +check_iso_image () { + local IDIR=$1 + local MNTDIR=$2 + [ ! -d $IDIR ] && return 1 + [ -z "$MNTDIR" ] && MNTDIR=/var/log/mount + + IISO=$(ls --indicator-style=none "$IDIR"/slackwar*-install-dvd.iso 2>/dev/null |tail -1) + + if [ -n "$IISO" ]; then + cat << EOF > $TMP/tempmsg + +An ISO image of Slackware's install DVD was found. +Do you want me to mount the ISO image and use this as the package source? + +EOF + dialog --title "USE ISO IMAGE" --yesno "`cat $TMP/tempmsg`" 9 65 + 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 +} |