[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

97.0. "Shutting down VMS with DECwindows" by SDSVAX::SWEENEY (Patrick Sweeney) Wed Feb 01 1989 14:13

    Could someone post their favorite DECwindows-friendly shutdown
    procedures here.  This was in the old conference.

T.RTitleUserPersonal
Name
DateLines
97.1Here's mineAGBEAR::HORNERA.G.Bear, Low tech teddy bearWed Feb 01 1989 17:35101
    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.2Reboot system from non-SYSTEM account with privsSEAN::DAVIDSONThu Feb 02 1989 08:5227
$ 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.3Here's a quick and dirty one...KONING::KONINGNI1D @FN42eqFri Feb 03 1989 12:1715
$ 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.4NPS Still Around?BULEAN::CARSONKnockwurst & ExcommunicationsFri Feb 03 1989 14:315
    Is NPS, (Non Priviledged Shutdown), still around?
    
    We've been using this on our cluster for some time now...
    

97.5how about this?MASTIC::FARRELLMoney, there is no substitute!Fri Feb 03 1989 15:5421
    
    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.6Does standard SHUTDOWN.COM need to be modified? ANARCY::DILIDDOI'm not indecisive.......Am I?Mon Feb 06 1989 10:0514
	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.7No modifications to shutdown, just you ;^)RABBET::FARRELLMoney, there is no substitute!Mon Feb 06 1989 10:4819
.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.8KONING::KONINGNI1D @FN42eqMon Feb 06 1989 12:356
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.9XUI::VANNOYJake VanNoyMon Feb 06 1989 13:222
Shutdown is fixed in V5.2.

97.10LESLIE::LESLIEAndy ��� LeslieMon Feb 06 1989 15:514
    The 5.2 shutdown can be copied from LESLIE""::SYS$PUBLIC:SHUTDOWN.COM
    
    Andy

97.11BUNYIP::QUODLINGApologies for what Doug Mulray said...Tue Feb 07 1989 22:5121
        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.12NPS is still around...DIAMON::ZGRAGGENSearching for infinity...Wed Feb 08 1989 05:4613
    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.13LESLIE::LESLIEAndy ��� LeslieWed Feb 08 1989 08:254
    re: .11
    
    sorry....... 

97.14NPS for customers?PRIMES::UEBERSAXKris - Primes DWT, Wash DCWed Mar 29 1989 06:045
    
    Is NPS available (or can it be made available) to customers?
    
    Kris

97.15ASSETS is in VTXSTAR::MFOLEYRebel without a ClueWed Mar 29 1989 11:177
	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.16NPS+DECW/VWS switch?SHARE::LEMONSAnd we thank you for your support.Wed Apr 26 1989 09:5511
    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.17IdeaDECWIN::FISHERBurns Fisher 381-1466, ZKO3-4/W23Wed Apr 26 1989 14:489
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.18I've seen something like that from VWS...PVX::VANSICLENDon't call me Frank...Wed Apr 26 1989 15:2710
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.19STAR::NOZELLLanguage is a virus from Outer Space.Wed Apr 26 1989 16:415
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.20VWSENG::KLEINSORGEToys 'R' UsWed Apr 26 1989 23:2418
    
    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.21NPS Shutdown for V5.4TARKIN::AHOSkeet addict...Fri Nov 09 1990 14:537

	Is there a kit for NPS-Shutdown for VMS 5.4??

				Thanks in advance

						~Mike~