blob: e34076c0d2a83fc85eb3f7fa082826144814bfb0 (
about) (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
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
}
|