#!/bin/bash # //////////////////////////////////////////////////////////////////////////// # # Name: NetVista_Install # Purpose: Extracts the tar.gz file containing the IBM NetVista Thin Client # Linux installation files # //////////////////////////////////////////////////////////////////////////// # # //////////////////////////////////////////////////////////////////////////// # # Main # //////////////////////////////////////////////////////////////////////////// # PACKAGE_CD_DIR="Linux/products/nvTCLinux" PACKAGE_NAME="NetVistaLTC.tar.gz" INSTALL_DIR="NetVistaLTC" README_FILE="README.html" PATH=$PATH:. clear echo -e "\nWelcome to the IBM NetVista Thin Client with TurboLinux preparation." echo -e "\nPreparing installation files . . . " # If package exists in the current directory, then we're unpacking locally # or from the correct CD directory. if [ -f $PACKAGE_NAME ]; then # If the temp install directory exists, remove it. if [ -d /tmp/$INSTALL_DIR ]; then rm -rf /tmp/$INSTALL_DIR fi # Extract the tar file tar -C /tmp -xzf $PACKAGE_NAME # Copy the README.html file to the temp dir if [ -f $README_FILE ]; then cp $README_FILE /tmp/$INSTALL_DIR fi # Tell the administrator what to do next echo -e "\nInstallation file successfully unpacked." echo -e "Please run /tmp/$INSTALL_DIR/TurboLinux/tl_install.sh to start the" echo -e "IBM NetVista Thin Client with TurboLinux product installation." else # Else assume we're running from another dir, and the package is on CD. echo -en "\nCDROM drive mount point [ /mnt/cdrom ] ? "; read cdrom if [ ! $cdrom ]; then cdrom="/mnt/cdrom" fi cd $cdrom if [ -f $cdrom/$PACKAGE_CD_DIR/$PACKAGE_NAME ]; then # If the temp install directory exists, remove it. if [ -d /tmp/$INSTALL_DIR ]; then rm -rf /tmp/$INSTALL_DIR fi # Extract the tar file tar -C /tmp -xzf $cdrom/$PACKAGE_CD_DIR/$PACKAGE_NAME # Copy the README.html file to /tmp if [ -f $cdrom/$PACKAGE_CD_DIR/$README_FILE ]; then cp $cdrom/$PACKAGE_CD_DIR/$README_FILE /tmp/$INSTALL_DIR fi # Tell the administrator what to do next echo -e "\nInstallation file successfully unpacked." echo -e "Please run /tmp/$INSTALL_DIR/TurboLinux/tl_install.sh to start the" echo -e "IBM NetVista Thin Client with TurboLinux product installation." else echo -e "\nUnable to locate the install package $PACKAGE_NAME." echo -e "Check that the package is in the current directory or" echo -e "that your CDROM drive mount point is correct." fi fi