T.R | Title | User | Personal Name | Date | Lines |
---|
97.1 | Here's mine | AGBEAR::HORNER | A.G.Bear, Low tech teddy bear | Wed Feb 01 1989 17:35 | 101 |
| I have a symbol defined that submits this to the SYSTEM account with the
appropriate parameter values. Apologies to the original author, but I
forgot where I copied it from.
Dave
$ set noverify
$ !
$ ! BATCH_SHUTDOWN.COM
$ !
$ ! Command procedure to shut down a system from batch and optionally reboot.
$ !
$ ! This command procedure can be run as a batch or network task, to
$ ! allow a system shutdown to be initiated remotely. It can also be
$ ! run interactively (e.g. after doing SET HOST to a remote system).
$ !
$ ! It works by the old trick of creating a detached process which runs under
$ ! LOGINOUT.EXE with a command procedure as input. That command procedure
$ ! then calls @SYS$SYSTEM:SHUTDOWN.COM with the appropriate parameters.
$ !
$ ! This can be used to shut down a system remotely via DECnet, or to shut down
$ ! each of the satellite nodes in a cluster without having to manually log in
$ ! and run SHUTDOWN.COM on each node. Under VMS 5.0, you can use the SYSMAN
$ ! utility to call this command procedure on all cluster nodes.
$ !
$ ! Parameters: (same as SHUTDOWN.COM)
$ !
$ ! P1 How many minutes until final shutdown?
$ ! Default: 0
$ ! P2 Reason for shutdown?
$ ! Default: "Rebooting system"
$ ! P3 Do you want to spin down the disk volumes?
$ ! Default: "NO"
$ ! P4 Do you want to invoke the site-specific shutdown procedure?
$ ! Default: "YES"
$ ! P5 When will the system be rebooted? (applies only if P6 is true)
$ ! Default: "shortly via automatic reboot" if P6 is true, or
$ ! "later" if P6 is false
$ ! P6 Should an automatic system reboot be performed?
$ ! Default: "YES"
$ ! P7 Shutdown options (enter as a comma-separated list):
$ ! REMOVE_NODE Remaining nodes in the cluster should adjust quorum
$ ! CLUSTER_SHUTDOWN Entire cluster is shutting down
$ ! REBOOT_CHECK Check existence of basic system files
$ ! Default: REBOOT_CHECK if not clustered
$ ! REMOVE_NODE,REBOOT_CHECK if clustered
$ !
$ privs = "CMKRNL, EXQUOTA, OPER, SYSNAM, SYSPRV, WORLD, LOG_IO"
$ saved_privs = f$setprv(privs) !Set required privileges
$ if .not. f$privilege(privs) then goto NO_PRIV
$ ! How many minutes until final shutdown?
$ if p1 .eqs. "" then p1 = 0
$ ! Reason for shutdown?
$ if p2 .eqs. "" then p2 = "Rebooting system"
$ ! Do you want to spin down the disk volumes?
$ if p3 .eqs. "" then p3 = "NO"
$ ! Do you want to invoke the site-specific shutdown procedure?
$ if p4 .eqs. "" then p4 = "YES"
$ ! Should an automatic system reboot be performed?
$ if p6 .eqs. "" then p6 = "YES"
$ ! When will the system be rebooted? (applies only if P6 is true)
$ if p6 .and. (p5 .eqs. "") then p5 = "shortly via automatic reboot"
$ if .not. p6 .and. (p5 .eqs. "") then p5 = "later"
$ ! Shutdown options
$ vaxcluster = f$getsyi ("VAXCLUSTER")
$ if p7 .eqs. ""
$ then if vaxcluster .eq. 0
$ then p7 = "REBOOT_CHECK"
$ else p7 = "REMOVE_NODE,REBOOT_CHECK"
$ endif
$ endif
$ ! Create a custom command procedure to do the the actual work
$ open/write com remote_shutdown.com
$ write com "$ set noverify !REMOTE_SHUTDOWN.COM"
$ write com "$ set process/priv=(all,nobypass)"
$ action = "shutdown"
$ if p6 then action = "shutdown and automatic reboot"
$ write com "$ ! Procedure for ''action' of system."
$ write com "$ ! Created by ",f$environment("PROCEDURE")
$ time = f$time()
$ write com "$ ! at ",time
$ write com "$ write sys$output ""Remote ''action' initiated""" ! ''time'"""
$ write com "$ @SYS$SYSTEM:SHUTDOWN.COM -"
$ write com " ""''p1'"" ""''p2'"" ""''p3'"" ""''p4'"" ""''p5'"" ""''p6'"" ""''p7'"""
$ close com
$ purge remote_shutdown.com !Only keep 1 copy around
$ run /detached -
/input=remote_shutdown.com - !Procedure we just created
/output=OPA0: - !Errors on console
/privileges=('privs') - !Privileges for SHUTDOWN.COM
/uic=[1,4] -
/process_name="Remote_Shutdown" -
sys$system:loginout.exe
$ exit
$ !
$ NO_PRIV: !Missing one or more privileges to shut the system down
$ write sys$output "Insufficient privileges to shut system down."
$ write sys$output "Privileges required are ",privs
$ exit %X24 ! %SYSTEM-F-NOPRIV, no privilege for attempted operation
|
97.2 | Reboot system from non-SYSTEM account with privs | SEAN::DAVIDSON | | Thu Feb 02 1989 08:52 | 27 |
| $ set ver
$ if f$process() .eqs. "Reboot"
$ then
$ deassign/job/all
$ delete/symbol/global/all
$ set proc/priv=all
$ @SYS$SYSTEM:SHUTDOWN 0 SHUTDOWN YES NO LATER YES NONE
$ exit
$ endif
$!
$ set proc/priv=all
$ run sys$system:loginout -
/proc="Reboot" -
/uic=[1,4] -
/input=sys$manager:reboot.com -
/output=nl: -
/error=nl: -
/noauthorize -
/noaccounting -
/page_file=10000 -
/ast_limit=100 -
/buffer_limit=32768 -
/file_limit=70 -
/priority=4 -
/priv=(all)
$ exit
|
97.3 | Here's a quick and dirty one... | KONING::KONING | NI1D @FN42eq | Fri Feb 03 1989 12:17 | 15 |
| $ inquire boot "Reboot"
$ if f$extract(0,1,f$edit(boot,"upcase,collapse")) .nes. "N"
$ then
$ DEF OPC$REBOOT Y
$ else
$ def opc$reboot N
$ endif
$DEF OPC$NODUMP Y
$ set noon
$DISMOUNT DUA1
$dismount net$arch
$dismount kits_disk
$mc dfs$control stop comm
$MC OPCCRASH
|
97.4 | NPS Still Around? | BULEAN::CARSON | Knockwurst & Excommunications | Fri Feb 03 1989 14:31 | 5 |
| Is NPS, (Non Priviledged Shutdown), still around?
We've been using this on our cluster for some time now...
|
97.5 | how about this? | MASTIC::FARRELL | Money, there is no substitute! | Fri Feb 03 1989 15:54 | 21 |
|
My favorite, which someone in this conference showed me, is to setup
the Utilities menu with a command "System Shutdown" which executes
a DCL command line something like this :
@SYS$SYSTEM:SHUTDOWN 0 "SHUTDOWN" NO YES IMMEDIATLY YES REMOVE_NODE
^ ^ ^ ^ ^ ^ ^ ^
| | | | | | | |
Filename Minutes Reason | Site | Auto Shutdown
before | Spec. | Reboot Option
Shutdown Spin |
Down When will
Disks it be back
This can be done using the FileView Customize menu and then
selecting Verbs and Menus.
$$$$ ted $$$$
|
97.6 | Does standard SHUTDOWN.COM need to be modified?
| ANARCY::DILIDDO | I'm not indecisive.......Am I? | Mon Feb 06 1989 10:05 | 14 |
|
I have a problem when I use AUTOGEN to reboot my workstation.
Instead of rebooting the system it freezes after stopping the
DECW$SERVER_0 process. I can't log in again to run a normal
shutdown - and I can't even log in via the console window.
My only option is to halt the machine and wait while the disks
are rebuilt on reboot. Has anyone else had this problem? Any
alternatives when using AUTOGEN?
Thanks,
Jim
|
97.7 | No modifications to shutdown, just you ;^) | RABBET::FARRELL | Money, there is no substitute! | Mon Feb 06 1989 10:48 | 19 |
|
.6 - Running Shutdown from a DECterm will not work (no kidding right?).
Shutdown shuts down the ques, disk, and then all other users except the one
running the file. However, when it does this, it stops the session manager.
Since all DECterm windows are children of the Session Manager, they are stoped.
The system is left basically useless.
To get around this, just execute SHUTDOWN from FileView process, this is it's
own process. This will work fine.
There is a note somewhere in this conference titled something like
"List you favorite SHUTDOWN ways here" (that is not a quote).
have fun,
$$$$ ted $$$$
|
97.8 | | KONING::KONING | NI1D @FN42eq | Mon Feb 06 1989 12:35 | 6 |
| All this Fileview hackery is fun, but of course it is pretty obvious that
SHUTDOWN.COM should have been fixed so it works correctly when run from
a DECterm. Is a QAR needed, or is a fix in the pipe?
paul
|
97.9 | | XUI::VANNOY | Jake VanNoy | Mon Feb 06 1989 13:22 | 2 |
| Shutdown is fixed in V5.2.
|
97.10 | | LESLIE::LESLIE | Andy ��� Leslie | Mon Feb 06 1989 15:51 | 4 |
| The 5.2 shutdown can be copied from LESLIE""::SYS$PUBLIC:SHUTDOWN.COM
Andy
|
97.11 | | BUNYIP::QUODLING | Apologies for what Doug Mulray said... | Tue Feb 07 1989 22:51 | 21 |
| re .-1
Doesn't work on V5.1, andy...
q
Bunyip> @sys$system:shutdown
SHUTDOWN -- Perform an Orderly System Shutdown
on node BUNYIP
%DCL-W-IVKEYW, unrecognized keyword - check validity and spelling
\SET_HOST_TERMINAL\
%DCL-E-INVIFNEST, invalid IF-THEN-ELSE nesting structure or data
inconsistency
%DCL-E-INVIFNEST, invalid IF-THEN-ELSE nesting structure or data
inconsistency
|
97.12 | NPS is still around... | DIAMON::ZGRAGGEN | Searching for infinity... | Wed Feb 08 1989 05:46 | 13 |
| RE: .4
Yes, Non-Priv'd shutdown is still available and can be found in
QUARRY""::SYS$KITS:[NPS]NPS020.A
For those who don't know NPS, it allows a system manager to grant
shutdown capability to the owners of workstations without giving those
users priv's, i.e. the system manager decides who can shutdown which
workstation.
Peter
|
97.13 | | LESLIE::LESLIE | Andy ��� Leslie | Wed Feb 08 1989 08:25 | 4 |
| re: .11
sorry.......
|
97.14 | NPS for customers? | PRIMES::UEBERSAX | Kris - Primes DWT, Wash DC | Wed Mar 29 1989 06:04 | 5 |
|
Is NPS available (or can it be made available) to customers?
Kris
|
97.15 | ASSETS is in VTX | STAR::MFOLEY | Rebel without a Clue | Wed Mar 29 1989 11:17 | 7 |
|
Try the ASSETS library.. There could be something in there.. I don't
know for sure but that would be the place to ask.. (also the people
to ask if it CAN be included if it's not there in the first place..)
mike
|
97.16 | NPS+DECW/VWS switch? | SHARE::LEMONS | And we thank you for your support. | Wed Apr 26 1989 09:55 | 11 |
| I need a tool that will allow a non-privileged user to shutdown/reboot
their workstation _AND_ switch from DECw to VWS and back, at will
(understanding that a reload is necessary to bring this off, of
course.). I coulda sworn I saw a tool like this announced, but
I can't find it in this notes file.
Does this exist?
Thanks!
tl
|
97.17 | Idea | DECWIN::FISHER | Burns Fisher 381-1466, ZKO3-4/W23 | Wed Apr 26 1989 14:48 | 9 |
| Sure...how about the halt button?
Seriously, I don't remember seeing such a thing. I suppose you could do
something like creating a captive account which had priv's and which would
rename the appropriate parameters file to be VAXVMSSYS.PAR and then run
shutdown (or OPCCRASH).
Burns
|
97.18 | I've seen something like that from VWS... | PVX::VANSICLEN | Don't call me Frank... | Wed Apr 26 1989 15:27 | 10 |
| There was a someone I know in DSG that had a VWS menu item for shutting down
the system. I would think getting into SYSGEN and renaming the PAR file would
be a simple matter from there. Send mail for a name, he won't like his name
in bright lights.
Maybe from there you can find a way to make it a verb off a menu. Desktop-VMS
does, though it's from a priviledge account.
garrett
|
97.19 | | STAR::NOZELL | Language is a virus from Outer Space. | Wed Apr 26 1989 16:41 | 5 |
| With a Desktop-VMS app, an unprived user may shut down his/her own
node. The system manager can shutdown any or all nodes.
-marc
|
97.20 | | VWSENG::KLEINSORGE | Toys 'R' Us | Wed Apr 26 1989 23:24 | 18 |
|
The VWS end is easy. Just edit SYS$MANAGER:UISBG.DAT and look at
the template command for running a user application. Make the
application LOGINOUT and point the INPUT to a command file and
the OUTPUT to WTA0: (so you can see it as it happens). Then in
the command file simply use SYSGEN (the command file is executed
in the SYSTEM account context) to change the .PAR file and invoke
the SHUTDOWN command file with REBOOT.
The key to this is to have a VWS.PAR and a DWS.PAR for each window
system.
Someone does have a canned version, I don't remember who or where.
I have AUTOGEN and a number of system management tools as UISBG
commands.
_Fred
|
97.21 | NPS Shutdown for V5.4 | TARKIN::AHO | Skeet addict... | Fri Nov 09 1990 14:53 | 7 |
|
Is there a kit for NPS-Shutdown for VMS 5.4??
Thanks in advance
~Mike~
|