home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PsL Monthly 1994 February
/
psl_9403.zip
/
psl_9403
/
DOS
/
COMMUNIC
/
HA221B.ZIP
/
REMOVE.SCR
< prev
next >
Wrap
Text File
|
1993-10-29
|
12KB
|
581 lines
REM remove.scr
REM script to remove drivers for SCO Xenix/UNIX
REM and AT&T/Interactive UNIX
REM (c) 1990-93 Hansco Information Technologies, Inc.
REM
REM Revision History:
REM 2.21 - version number changed to follow INSTALL.SCR
REM 2.2 - 'hboot' now stored in /tmp directory
REM changed 'CALL remove' to 'GOSUB'
REM added DIM statement for some variables
REM 2.17a - Simplified options
REM Cleaned up screen messages
REM 2.15 Improved WordPerfect removal to prompt for
REM .trs directory
REM 2.14b - Auxiliary script files merged in
REM 2.12 - Driver file names changed
REM Computone IntelliPort II support
REM Changed sco check to oem=3000
REM 2.11 - Assign default value to {os} variable
REM so error message looks reasonable
REM Improved method for detecting Unix
REM Added VP/ix support for AT&T/Interactive
REM 2.1 - Uses HBOOT to load files over
REM
DIM ft 1 ansi 1 remv 1
DIM P 2 code 2 ver 4 dver 4 td 4
SCREEN OFF
ON BREAK GOTO a1
LET prod = HIT/Ansi
LET ver = 2.21
LET dver = 2.21
LET os = Xenix/Unix
LET td = /tmp
LET P = #{SP}
TIMEOUT 5
SEND {CR}
EXPECT {P}
IF {err} <> 0 GOTO n1
LET ans = 2
SEND uname | grep -cy "xenix"{CR}
EXPECT {LF}
READ os
IF {os} = 1 GOTO r3
EXPECT {P}
SEND uname | grep -cy "unix"{CR}
EXPECT {LF}
READ os
IF {os} <> 1 GOTO r3
EXPECT {P}
SEND uname -a | grep -cy "oem=3000"{CR}
EXPECT {LF}
READ ans
IF {ans} = 0 LET ans = 4
IF {ans} = 1 LET ans = 3
:r3
SCREEN ON
GOTO t1
:lp1
GOSUB rhd
ECHO {SP} {prod} has detected removal from an {ma} {os} system.
ECHO
ECHO {SP} Select an option:
ECHO {SP} (1) Operating System correct
ECHO {SP} (2) Select SCO Xenix
ECHO {SP} (3) Select SCO Unix
ECHO {SP} (4) Select AT&T/Interactive Unix
ECHO
DISPLAY {SP} Enter your choice:{SP}
INPUT ans
IF {err} <> 0 GOTO a1
:t1
IF {ans} = 1 GOTO u9
IF {ans} = 2 GOTO u1
IF {ans} = 3 GOTO u2
IF {ans} = 4 GOTO u3
ECHO
ECHO
ECHO {SP} Invalid option selected.{07}
WAIT 3
GOTO lp1
:u1
LET os = Xenix
LET ma = SCO
GOTO lp1
:u2
LET os = Unix{SP}
LET ma = SCO
GOTO lp1
:u3
LET os = Unix{SP}
LET ma = AT&T/Interactive
GOTO lp1
:u9
SCREEN ON
:r1
LET ft = N
LET ansi = N
GOSUB rhd
ECHO
ECHO {SP} Select an option:
ECHO {SP} (1) Remove All Drivers
ECHO {SP} (2) Remove File Transfer only
ECHO {SP} (3) Remove {os} Console Drivers only
ECHO {SP} (4) Exit
ECHO
DISPLAY {SP} Enter your choice:{SP}
INPUT ans
IF {err} <> 0 GOTO a1
IF {ans} = 1 LET ft = Y
IF {ans} = 1 LET ansi = Y
IF {ans} = 2 LET ft = Y
IF {ans} = 3 LET ansi = Y
IF {ans} = 4 GOTO l8
IF {ft} = Y GOTO r2
IF {ansi} = Y GOTO r2
ECHO
ECHO
ECHO {SP} Invalid option selected.{07}
WAIT 3
GOTO r1
:r2
GOSUB rhd
ECHO
ECHO {SP} The following options will be removed:
ECHO
IF {ft} = Y ECHO {SP} File Transfer
IF {ansi} = Y ECHO {SP} {os} Console Drivers
ECHO
DISPLAY {SP} Are the above options correct? (y/n){SP}
INPUT ans
IF {err} <> 0 GOTO a1
IF {ans} = y GOTO d1
IF {ans} = Y GOTO d1
GOTO r1
:d1
CLS
SCREEN OFF
EXPECT {P}
SEND stty -echo{CR}
GOSUB ich
SCREEN OFF
IF {err} <> 0 GOTO n3
IF {ansi} <> Y GOTO l6
REM
REM Begin WordPerfect 5.0
REM
LET F = /usr/wp
:WP1
EXPECT {P}
SEND [ -d "{F}/sdata" -a -w "{F}/sdata" ] ; echo $?{CR}
LET ans = {SP}
READ ans
IF {ans} = 0 GOTO WP2
EXPECT {P}
SEND [ -d "{F}/slib" -a -w "{F}/slib" ] ; echo $?{CR}
LET ans = {SP}
READ ans
IF {ans} = 0 GOTO WP3
SCREEN ON
ECHO
DISPLAY Is WordPerfect 5.0 installed on the {os} system? (y/n){SP}
INPUT ans
ECHO
SCREEN OFF
IF {err} <> 0 GOTO a1
IF {ans} = y GOTO WP6
IF {ans} <> Y GOTO l1
:WP6
SCREEN ON
ECHO
ECHO Please enter the {os} directory where WordPerfect
ECHO terminal definition files (files ending in .trs)
DISPLAY are installed: (example: /usr/wp/data){SP}
INPUT F
ECHO
SCREEN OFF
IF {err} <> 0 GOTO a1
EXPECT {P}
SEND [ -d "{F}" -a -w "{F}" ] ; echo $?{CR}
LET ans = {SP}
READ ans
IF {ans} = 0 GOTO WP4
GOTO WP1
:WP2
LET F = {F}/sdata
GOTO WP4
:WP3
LET F = {F}/slib
:WP4
LET G = ansi.trs
GOSUB rul
IF {err} <> 0 GOTO l1
LET ansi = U
REM
REM End WordPerfect 5.0
REM
:l1
IF {ma} = SCO LET G = ansi
IF {ma} <> SCO LET G = AT386
LET F = /usr/vpix/term
EXPECT {P}
SEND [ -d "{F}" -a -w "{F}" ] ; echo $?{CR}
LET ans = {SP}
READ ans
IF {ans} <> 0 GOTO l2
EXPECT {P}
LET ans = {SP}
SEND grep -c "{prod}" {F}/{G}{CR}
READ ans
IF {ans} = 0 GOTO l1a
GOSUB rsv
IF {err} <> 0 GOTO l2
LET ansi = U
:l1a
IF {ma} <> SCO GOTO l2
LET G = ansic
EXPECT {P}
LET ans = {SP}
SEND grep -c "{prod}" {F}/{G}{CR}
READ ans
IF {ans} = 0 GOTO l2
GOSUB rsv
IF {err} <> 0 GOTO l2
LET ansi = U
:l2
EXPECT {P}
SEND [ -w "/etc/mscreencap" ] ; echo $?{CR}
LET ans = {SP}
READ ans
IF {ans} <> 0 GOTO l3
GOSUB irm
IF {err} <> 0 GOTO l3
SCREEN ON
DISPLAY Removing mscreen support...{SP}{SP}
SCREEN OFF
EXPECT {P}
SEND {td}/remove.sh -n {prod} "multiscreen driver" {ver} /etc/mscreencap{CR}
LET dvr = multiscreen
GOSUB rgc
IF {err} <> 0 GOTO l3
SCREEN ON
ECHO OK
SCREEN OFF
LET ansi = U
:l3
EXPECT {P}
SEND [ -d "/usr/lib/terminfo" ] ; echo $?{CR}
READ ans
IF {ans} <> 0 GOTO l4
LET F = /usr/lib/terminfo
LET G = ansimrg.src
GOSUB rul
IF {err} <> 0 GOTO l4
LET G = a/ansi
GOSUB rsv
IF {err} <> 0 GOTO l4
IF {ma} <> SCO GOTO l4
LET G = a/ansic
GOSUB rsv
IF {err} <> 0 GOTO l4
LET ansi = U
:l4
EXPECT {P}
SEND [ -w "/etc/termcap" ] ; echo $?{CR}
READ ans
IF {ans} <> 0 GOTO l5
GOSUB irm
IF {err} <> 0 GOTO l5
SCREEN ON
DISPLAY Removing termcap lprint support...{SP}{SP}
SCREEN OFF
EXPECT {P}
SEND {td}/remove.sh -n {prod} "local printer driver" {ver} /etc/termcap{CR}
LET dvr = local{SP}printer
GOSUB rgc
IF {err} <> 0 GOTO l5
SCREEN ON
ECHO OK
SCREEN OFF
LET ansi = U
:l5
EXPECT {P}
SEND [ -w "/etc/default/fip.d/intellicap" ] ; echo $?{CR}
READ ans
IF {ans} = 0 GOTO l5b
EXPECT {P}
SEND [ -w "/etc/ic_master" ] ; echo $?{CR}
READ ans
IF {ans} <> 0 GOTO l6
GOSUB irm
IF {err} <> 0 GOTO l6
SCREEN ON
DISPLAY Removing Computone support...{SP}{SP}
SCREEN OFF
EXPECT {P}
SEND {td}/remove.sh -n {prod} "Computone support" {ver} /etc/ic_master{CR}
LET dvr = Computone
GOSUB rgc
IF {err} <> 0 GOTO l6
SCREEN ON
ECHO OK
SCREEN OFF
LET ansi = U
GOTO l6
:l5b
GOSUB irm
IF {err} <> 0 GOTO l6
SCREEN ON
DISPLAY Removing Computone IntelliPort II support...{SP}{SP}
SCREEN OFF
EXPECT {P}
SEND {td}/remove.sh -n {prod} "Computone IntelliPort II support" {ver} /etc/default/fip.d/intellicap{CR}
LET dvr = Computone
GOSUB rgc
IF {err} <> 0 GOTO l6
SCREEN ON
ECHO OK
SCREEN OFF
LET ansi = U
:l6
IF {ft} <> Y GOTO l7
LET F = /usr/bin
LET G = hrcv
GOSUB rul
IF {err} <> 0 GOTO l7
LET F = /usr/bin
LET G = hsend
GOSUB rul
IF {err} <> 0 GOTO l7
LET ft = U
:l7
ON BREAK GOTO
IF {ft} = U GOTO l7a
IF {ansi} = U GOTO l7a
GOTO l8
:l7a
SCREEN ON
ECHO
ECHO The following options have been removed:
ECHO
IF {ft} = U ECHO {TB}File Transfer
IF {ansi} = U ECHO {TB}{os} Console Drivers
ECHO
:l8
SCREEN OFF
EXPECT {P}
SEND stty echo{CR}
EXPECT {P}
SEND {CR}
SCREEN ON
STOP
:a1
ON BREAK GOTO
SCREEN ON
ECHO
ECHO {07}
ECHO Removal aborted by operator...
SCREEN OFF
TIMEOUT 2
SEND {CR}
EXPECT {P}
EXPECT {P}
GOTO l8
:n1
TIMEOUT 2
EXPECT xyz!%&
SCREEN ON
ECHO {07}{07}
ECHO To remove {prod} {os} Drivers, you must be the
ECHO super-user (logged in as 'root').
ECHO
SCREEN OFF
SEND {CR}
SCREEN ON
STOP
:n3
SCREEN OFF
TIMEOUT 2
EXPECT xyz!%&
SCREEN ON
ECHO {07}{07}
ECHO To remove {prod} {os} Drivers, the hboot file must
ECHO install properly.
ECHO
ECHO Please try removing the drivers again.
ECHO