⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 tifis

📁 <B>Digital的Unix操作系统VAX 4.2源码</B>
💻
📖 第 1 页 / 共 2 页
字号:
#!/bin/sh5# tifis   --      Technician's Interface to Factory Installed Software.##			Copyright (c) 1990 by#		Digital Equipment Corporation, Maynard, MA#			All rights reserved.##	This software is furnished under a license and may be used and#	copied  only  in accordance with the terms of such license and#	with the  inclusion  of  the  above  copyright  notice.   This#	software  or  any  other copies thereof may not be provided or#	otherwise made available to any other person.  No title to and#	ownership of the software is hereby transferred.		##	The information in this software is subject to change  without#	notice  and should not be construed as a commitment by Digital#	Equipment Corporation.					##	Digital assumes no responsibility for the use  or  reliability#	of its software on equipment which is not supplied by Digital.##	SCCSID = "@(#)tifis	1.2	(ULTRIX)	8/14/90"#### ## This script provides an interface between the Technician and# the FIS Server.  tifis provides the following functionality:## o       Hardware Ethernet Address modification# o       Serial Number tracking via the Error Logging Facilities# o       Choice of "fsi" to load the client## This script is a Phase I pass at tifis.  Phase II will # transform this script into "C" code which will communicate# to the clients to gather configuration information, and boot# these clients.  Phase III will enhance this "C" code to include# a DECWindows interface.## Modification History:# ~~~~~~~~~~~~~~~~~~~~#       000     --      Scott M. Fafrak         05-Jun-90#       001     --      Scott M. Fafrak         20-Jun-90#                       #                       Modified script so that all responses have default#                       answers.  Deleted the Ask_Graphics_Driver -- No longer#                       necessary.  Added Layered product support.##       002     --      Scott M. Fafrak         29-Jun-90##                       Added "getopts" to allow default flags to be set.##	003	James C. Overman	14-Aug-90#		Added DS5100 support to tifis#ECHO=PATH=.:/etc:/bin:/usr/bin:/usr/ucbHOME=/usr/users/fisDNET=/usr/lib/dnetMACHTYPE=`/bin/machine`export PATH HOME MACHTYPE# Define the initial "default" responsesDEBUG="FALSE"CLIENT_DEFAULT=1SERIAL_N_DEFAULT="No Default" SERIAL_N_STARTER="AB" # This should equal the Manufacturing Site's SN initialsASN_ERROR=1ADDRESS_DEFAULT="No Default"ADDRESS_STARTER="08-00-2B-"AHEA_ERROR=1IMAGE_DEFAULT=1CLTYPE_DEFAULT=1SERVER_LN0="SERVER_NAME_on_LN0"SERVER_LN1="SERVER_NAME_on_LN1"# trap interruptstrap 'while :do        echo "        Do you really want to quit? (y/n) []: \c"                read trap_answer                case $trap_answer        in                [yY]* )  echo "        Bye..."                         exit 1 ;;                [nN]* )                         break ;;        esacdone ' 1 2 3 18#while getopts vx option#do#        case "$option"#        in#                v)      set -v;;#                x)      set -x;;#               \?)      echo "Usage: tifis [-v] [-x]"#                        echo "  -v means do a set -v"#                        echo "  -x means do a set -x"#                        exit 1;;#        esac#done# Get and Evaluate command line arguments (if any)while [ "$#" -gt 0 ]do        case $1        in                -[dD] ) DEBUG=TRUE                        shift;;                -[xX] ) set -x                        shift;;                    * ) echo "Usage: tifis [-d] [-v] [-x]"                        echo "  -d means turn on minimal trace functionality"                        echo "  -x means turn on \"set -x\" functionality";;        esacdone################################################################################: Print_Client_Selection################################################################################# This function displays the client menu and queries for the tech's selection.# The function asks if the tech is sure of his/her selection.  The selection is# verified to be inactive.Print_Client_Selection(){  if [ "$DEBUG" = "TRUE" ] then        echo "\n"        echo "*** Now Entering the Print_Client_Selection() function"        echo "\n"        sleep 1 fi  PCS_boolean="FALSE" PCS_answer=0 clear while [ "$PCS_boolean" = "FALSE" ] do        echo "                tifis for RISC Ultrix           Version 1.0             05-Jun-90                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~                Client Name     Selection               Client Name     Selection        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n        FIS001                  1               FIS011                 11        FIS002                  2               FIS012                 12        FIS003                  3               FIS013                 13        FIS004                  4               FIS014                 14        FIS005                  5               FIS015                 15        FIS006                  6               FIS016                 16        FIS007                  7               FIS017                 17        FIS008                  8               FIS018                 18        FIS009                  9               FIS019                 19        FIS010                 10               FIS020                 20                Type ? for Help...        Type "EXIT" to exit the program...        Please enter your selection [ $CLIENT_DEFAULT ]: \c"        read PCS_answer        if [ "$DEBUG" = "TRUE" ]        then                echo "\n"                echo "*** $PCS_answer was entered in PCS_answer"                echo "\n"                sleep 1        fi        if [ -z "$PCS_answer" ]        then                PCS_answer="$CLIENT_DEFAULT"        fi        case $PCS_answer        in                        \?)     clear                                more $HOME/HELP/Client_Selection.help                                echo "        Press [Return] to continue...\c"                                read PCS_continue;;                    "EXIT")     echo "        Exitting...  Bye...\n"                                exit;;           [1-9]|1[0-9]|20)     while :                                do                                        echo "\n        Are you sure? ( y or n ) \c"                                        read PCS_verify                                        case $PCS_verify                                        in                                                [yY]*)  if [ "$PCS_answer" -lt 10 ]                                                        then                                                                PCS_answer="0${PCS_answer}"                                                        fi                                                        if [ -f $HOME/FISINIT/fis0${PCS_answer}.fisinit ]                                                        then                                                                echo "\n        fis0${PCS_answer} is currently in use."                                                                echo "        Please reenter your selection."                                                                sleep 5                                                        else                                                                PCS_boolean="TRUE"                                                        fi                                                                break;;                                                [nN]*)  break;;                                        esac                                done;;                         *)     continue;;        esac done        }################################################################################: Assign_Client################################################################################# This function assigns the tech's selection, assigns the dlclient area and the# defines the load host's IP broadcast name as the client will see it.Assign_Client(){ if [ "$DEBUG" = "TRUE" ] then        echo "\n"        echo "*** Now Entering the Assign_Client() function"        echo "\n"        sleep 1 fi case $PCS_answer in        0[1-9]|1[0-9]|20)       CLIENT="fis0$PCS_answer";;                       *)       echo "\nNot a valid answer: $PCS_answer  *";; esac# This loop assigns the dlclient and hostname space.  As more client areas come# online, this loop will need to be modified accordingly.  A possible solution# would be to modulus by two (for the even numbered clients) and then those # greater than say ten go into area 2 those less than go into 0, else those # greater than ten go into 3 and those less than go into 1.  if [ `expr $PCS_answer % 2` -eq 0 ] then        SERVER="$SERVER_LN0"        CLIENT_AREA="/dlclient0" else        SERVER="$SERVER_LN1"        CLIENT_AREA="/dlclient1" fi }################################################################################: Ask_Client_Type################################################################################Ask_Client_Type(){ if [ "$DEBUG" = "TRUE" ] then        echo "\n"        echo "*** Now Entering the Ask_Client_Type() function"        echo "\n"        sleep 1 fi ACT_boolean="FALSE"  clear while [ "$ACT_boolean" = "FALSE" ] do         echo "                Client Type                     Selection        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~        DECstation 2100/3100    (PMIN/PMAX)     1        DECstation 5000-200     (3MAX)          2               DECstation 5100         (MIPSmate )     3                Type ? for Help...        Please enter the Client's machine type [ $CLTYPE_DEFAULT ]: \c"        read ACT_answer                if [ -z "$ACT_answer" ]        then                ACT_answer=$CLTYPE_DEFAULT            fi                        case $ACT_answer        in                \?)   clear                      more $HOME/HELP/FIS_CLType_Selection.help                      echo "        Press [Return] to continue...\c"                      read ACT_continue;;                 1)   CLTYPE="DS3100"                      ACT_boolean="TRUE";;                 2)   CLTYPE="DS5000"                      ACT_boolean="TRUE";;		 3)   CLTYPE="DS5100"                      ACT_boolean="TRUE";;                 *)   continue;;        esac done        

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -