#!/bin/sh
if [ -d /cdrom/slakware ]; then
  dialog --title "INSTALLING FROM SLACKWARE CD-ROM" --msgbox "The Slackware \
CD-ROM has been located under /cdrom.  Software will be installed from \
the /cdrom/slakware directory." 7 55
fi
SOURCEDIR="/cdrom/slakware"
rm -f /var/adm/mount 2> /dev/null
rmdir /var/adm/mount 2> /dev/null
ln -sf $SOURCEDIR /var/adm/mount
if [ -d $SOURCEDIR ]; then
 echo "/var/adm/mount" > /tmp/SeTDS
 echo "-source_mounted" > /tmp/SeTmount
 echo "/dev/null" > /tmp/SeTsource
 exit
else
 dialog --title "INVALID DIRECTORY ENTERED" --msgbox \
"Sorry - the CD-ROM could not be found.  Please check to make sure that \
it is mounted beneath /cdrom and try again. (Directory given: $SOURCEDIR)" \
8 65
 rm -f /tmp/SeTDS /tmp/SeTmount /tmp/sourcedir
fi
