home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
- while [ 0 ]; do
- rm -f /tmp/SeTDS /tmp/SeTmount
- cat << EOF > /tmp/tmpmsg
-
- We will install from the same DOS partition which you have
- already configured as the target Linux partition. In which
- directory on this partition can the Slackware sources (and
- the subdirectories for each disk to be installed) be
- found?
-
- Which directory would you like to install from?
- EOF
- dialog --title "INSTALL FROM THE CURRENT FILESYSTEM" \
- --inputbox "`cat /tmp/tmpmsg`" 19 67 2> /tmp/sourcedir
- if [ $? = 1 -o $? = 255 ]; then
- rm -f /tmp/sourcedir /tmp/tmpmsg
- exit
- fi
- SOURCEDIR="/mnt/`cat /tmp/sourcedir`"
- rm -f /tmp/sourcedir /tmp/tmpmsg
- 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
- cat << EOF > /tmp/tmpmsg
-
- Sorry - the directory you specified is not valid. Please
- check the directory and try again.
-
- (Directory given: $SOURCEDIR)
-
- EOF
- dialog --title "INVALID DIRECTORY ENTERED" --msgbox "`cat /tmp/tmpmsg`" 10 65
- rm -f /tmp/SeTDS /tmp/SeTmount /tmp/sourcedir /tmp/tmpmsg
- fi
- done;
-