MAP INS S1:=SYS:PUBLIC
REM Test for login as the user BACKUP
IF LOGIN_NAME="BACKUP" THEN BEGIN
     REM Replace the xxxxxxxxxxxx with the 12-digit hexadecimal
     REM address of the LAN adapter installed in the tape backup
     REM workstation.
     IF P_STATION="xxxxxxxxxxxx" THEN BEGIN
          REM The next two lines prevent CTRL-BREAK and CTRL-C
          REM from breaking out of the login script and batch files
          REM executed from the login script.
          BREAK OFF
          DOS BREAK OFF
          REM Prevent console broadcasts or SEND messages
          REM from interrupting the login script
          REM The pound sign (#) is the external execution command
          #CASTOFF ALL
          REM Clear the screen (there's no direct command for this)
          #COMMAND /C CLS
          REM Place an announcement on the screen
          REM Position the announcement on line 10
          WRITE "\n\n\n\n\n\n\n\n\n"
          WRITE "Waiting until 1:00 AM to begin backup procedure."
          WRITE "\n\n\n\n\n\n\n\n"
          REM Next is the label used by the time loop
          TIMELOOP:
          REM Display the time on screen and update continuously
          WRITE "%HOUR24:%MINUTE:%SECOND\r";
          REM Check the time and loop until 1:00 A.M.
          IF "%HOUR24"<>"01" THEN GOTO TIMELOOP
          IF "%MINUTE"<>"00" THEN GOTO TIMELOOP
          REM Backup time has arrived, so set up necessary drive
          REM mappings and exit the login script to begin the backup
          REM procedure.
          MAP F:=FS1/SYS:
          MAP G:=FS1/VOL1:
          MAP T:=FS1/SYS:TAPE
          DRIVE T:
          REM Leave the login script and run the TAPE.BAT file
          REM to execute the backup procedure itself.  Make sure
          REM the TAPE.BAT file ends with a LOGOUT command!
          EXIT "TAPE.BAT"
     REM Log the user out immediately if logging in as
     REM the BACKUP user from an unauthorized workstation.
     ELSE
          EXIT "LOGOUT"
     END
 END

