#!/bin/sh export TEXTDOMAIN=slint . gettext.sh TMP=/var/log/setup/tmp if [ ! -d $TMP ]; then mkdir -p $TMP fi # Include function to check for Slint ISO images: . /usr/lib/setup/INCISO if [ -f $TMP/Punattended ]; then eval $(grep "^NFS_SERVER=" $TMP/Punattended) eval $(grep "^NFS_ROOT=" $TMP/Punattended) fi while [ 0 ]; do rm -f $TMP/SeTDS $TMP/SeTmount $TMP/SeTsource $TMP/nfsout UPNRUN=`cat $TMP/SeTupnrun 2> /dev/null` if [ "$REMOTE_IPADDR" = "" ]; then REMOTE_IPADDR=${NFS_SERVER}; fi if [ "$REMOTE_PATH" = "" ]; then REMOTE_PATH=${NFS_ROOT}; fi echo > $TMP/tempmsg gettext "Good! We're all set on the local end, but now we need to know where to find the software packages to install. First, we need the IP address of the machine where the Slint sources are stored." >> $TMP/tempmsg echo >> $TMP/tempmsg echo >> $TMP/tempmsg if [ "$UPNRUN" = "0" ]; then gettext "Since you're already running on the network, you should be able to use the hostname instead of an IP address if you wish." >> $TMP/tempmsg echo >> $TMP/tempmsg echo >> $TMP/tempmsg fi gettext "What is the IP address of your NFS server?" >> $TMP/tempmsg echo "" >> $TMP/tempmsg dialog --title "`gettext "ENTER IP ADDRESS OF NFS SERVER"`" --inputbox \ "`cat $TMP/tempmsg`" 14 80 $REMOTE_IPADDR 2> $TMP/remote if [ ! $? = 0 ]; then rm -f $TMP/tempmsg $TMP/remote exit fi REMOTE_IPADDR="`cat $TMP/remote`" rm $TMP/remote gettext " There must be a directory on the server with the Slint \ packages and files arranged in a tree like the FTP site. The installation script needs to know the name of the \ directory on your server that contains the packages. \ For example, if the packages' directory is /stuff/slint, \ then you would respond: /stuff/slint What is the Slint source directory? " > $TMP/tempmsg dialog --title "`gettext "SELECT SOURCE DIRECTORY"`" --inputbox "`cat $TMP/tempmsg`" 18 \ 80 $REMOTE_PATH 2> $TMP/slacksrc if [ ! $? = 0 ]; then rm -f $TMP/tempmsg $TMP/slacksrc exit fi REMOTE_PATH="`cat $TMP/slacksrc`" rm $TMP/slacksrc gettext " In the next screen you should watch for NFS mount errors. \ If you see errors and you don't see your NFS server listed, then try setting up NFS again. " > $TMP/tempmsg dialog --title "`gettext "NFS MOUNT INFORMATION"`" --msgbox "`cat $TMP/tempmsg`" 10 80 rm -f $TMP/tempmsg touch $TMP/nfsout if [ ! "$UPNRUN" = "0" ]; then if [ -x /etc/rc.d/rc.rpc ]; then echo "Starting RPC services..." >> $TMP/nfsout /etc/rc.d/rc.rpc restart >> $TMP/nfsout 2>&1 fi fi eval_gettext "Mounting \$REMOTE_PATH:" >> $TMP/nfsout echo "" >> $TMP/nfsout echo "mount -r -t nfs -o vers=3 $REMOTE_IPADDR:$REMOTE_PATH /var/log/mount" >> $TMP/nfsout mount -r -t nfs -o vers=3 $REMOTE_IPADDR:$REMOTE_PATH /var/log/mount if [ ! $? = 0 ]; then gettext "Didn't work." >> $TMP/nfsout echo "" >> $TMP/nfsout gettext "Maybe you should check that the directory name is correct?" >> $TMP/nfsout echo "" >> $TMP/nfsout DEFANSW="yes" else DEFANSW="no" fi echo "" >> $TMP/nfsout gettext "Current NFS mounts:" >> $TMP/nfsout echo "" >> $TMP/nfsout mount -t nfs >> $TMP/nfsout 2>&1 echo "" >> $TMP/nfsout gettext "Do you need to try setting up NFS again?" >> $TMP/nfsout echo "" >> $TMP/nfsout if [ "$DEFANSW" = "no" ]; then dialog --title "`gettext "NFS MOUNT RESULT"`" \ --defaultno --yesno "`cat $TMP/nfsout`" 17 80 RET=$? else dialog --title "`gettext "NFS MOUNT RESULT"`" --yesno "`cat $TMP/nfsout`" 17 80 RET=$? fi rm -f $TMP/nfsout if [ $RET = 1 ]; then # OK with the NFS mount. # First, check if a Slint ISO image is present in /var/log/mount if check_iso_image /var/log/mount /var/log/mntiso ; then echo "/var/log/mntiso" > $TMP/SeTDS else echo "/var/log/mount" > $TMP/SeTDS fi echo "-source_mounted" > $TMP/SeTmount echo "/dev/null" > $TMP/SeTsource break fi done