Operating System - OpenVMS
cancel
Showing results for 
Search instead for 
Did you mean: 

how to make shutdown.com reboot without asking questions everytime

 
SOLVED
Go to solution
Scotty HD
Frequent Advisor

how to make shutdown.com reboot without asking questions everytime

hello,
from a user account, i use the following command to reboot the system
$@sys$system:shutdown
this asks lot of questions before it reboots the system.
if i reboot system frequently and have fixed answers for the questions then
answering the above question everytime is annoying.

from system account, i heard there is a easier way to reboot using a reboot symbol.
is this reboot symbol available for user account ?
else, any other quick way to issue a reboot command so that the above command does not ask questions for a user account?

Scotty
13 REPLIES 13
Hein van den Heuvel
Honored Contributor
Solution

Re: how to make shutdown.com reboot without asking questions everytime

You can do what LOGIN.COM does for the SYSTEM account.
Define some symbols which call SYS$SYSTEM:SHUTDOWN with pre-set values/answers.

:
SYS$COMMON:[SYSMGR]LOGIN.COM;1
:
$ SHUTDOWN == "@SYS$SYSTEM:SHUTDOWN 0 SHUTDOWN NO YES LATER NO NONE"
$ REBOOT == "@SYS$SYSTEM:SHUTDOWN 0 SHUTDOWN NO YES LATER YES NONE"
$ SHUTDOWN1 == "@SYS$SYSTEM:SHUTDOWN"

Gotta say... SYS$SYSTEM:SHUTDOWN.COM is pretty lame is being totally undocumented.
Would it have cost too much to enumerate the arguments to it, and its ASK subroutine?
Jeez, what were we thinking? (Were we thinking?)

Hein.
Scotty HD
Frequent Advisor

Re: how to make shutdown.com reboot without asking questions everytime

Hein van den Heuvel>>
i tried your suggestion, but when i issue the reboot command, it asks questions again
$REBOOT == "@SYS$SYSTEM:SHUTDOWN 0 SHUTDOWN NO YES LATER YES NONE"
$REBOOT

SHUTDOWN -- Perform an Orderly System Shutdown
on node DISNEY

Do you really want to shutdown node DISNEY [NO]?

is my step correct?

Scotty
Hein van den Heuvel
Honored Contributor

Re: how to make shutdown.com reboot without asking questions everytime

Works for me! Dang... now I have to reboot! :-).

Maybe you have a LOCAL symbol defined which takes precedence?

$ SHOW SYMB REB*

Hein


Scotty HD
Frequent Advisor

Re: how to make shutdown.com reboot without asking questions everytime

Hein van den Heuvel>>
--Works for me! Dang... now I have to reboot! :-).
oopsie, that was funny. i wont laugh much as it was because of me :)

no symbol is defined.
$ SHOW SYMB REB*
REBOOT == "@SYS$SYSTEM:SHUTDOWN 0 SHUTDOWN NO YES LATER YES NONE"
$

this works for me when i log in from system account. but from user account it never works for me.

did it work for you from a user account ?

Scotty
Scotty HD
Frequent Advisor

Re: how to make shutdown.com reboot without asking questions everytime

i just found out that it does not work for me even from a system account. bad. dont know whats wrong.

Scotty
Hein van den Heuvel
Honored Contributor

Re: how to make shutdown.com reboot without asking questions everytime



1) I needed to reboot anyway to stop/start the windows net service msipcap, to get the network going after a pause for my freeAxp session.

2) I ran as a user 'hein', UIC 2,1, all privs.

3) Which OpenVMS version?

4) does not work for me ...

It does not shut down? errors? Asks anyway?

Hmmm....

Maybe somebody / something gave the system a 'better' SHUTDOWN.COM

Check for older versions and/or root specific versions versus SYS$COMMON:[SYSEXE]

Just try a run with verification on?!

$ define SHUTDOWN$VERIFY x
$ set veri
$ @SYS$SYSTEM:SHUTDOWN 0 SHUTDOWN NO YES LATER YES NONE
:

It should run into lines like:

$if p2 .eqs. "" then recurse ASK shutdown$ -
"Reason for shutdown" "Standalone" s

The 'recurse' is a silly (very silly IMHO) obfuscation of 'CALL' , and should not be called if there is a p2

Or just read the command file and see what gives (or not).

Hein.
Scotty HD
Frequent Advisor

Re: how to make shutdown.com reboot without asking questions everytime

Hein van den Heuvel>>
i should do tests better.

after defining the symbol you have given, this what happens
----
$REBOOT == "@SYS$SYSTEM:SHUTDOWN 0 SHUTDOWN NO YES LATER YES NONE"
$REBOOT

SHUTDOWN -- Perform an Orderly System Shutdown
on node DISNEY

Do you really want to shutdown node DISNEY [NO]?
----
if i answer yes, then this will not ask any further questions and reboots. great.

can i make the reboot symbol skip the above question also ?
i am using V83I

Scotty
Hein van den Heuvel
Honored Contributor

Re: how to make shutdown.com reboot without asking questions everytime

Ah... that's an extra question in case you used SET HOST to the system and perhaps are about to shutdown the wrong system (window says X, actually active on Y).

It comes from this code in SHUTDOWN.COM


$if f$getdvi( "sys$command", "set_host_terminal" )
$then
$recurse ASK shutdown$ -
"Do you really want to shutdown node ''nodename'" -

So that's why it works for me, being on the console because my network was down, and not for you.

You can not make that go away without changing the code.
You could SUBMIT the shutdown command as alternative.

I suspect that now you know it is just the 1 more question you'll live with it. But I would have no qualm changing shutdown.com for this reason. Just don't complain if some day you accidental shutdown DISNEY whilst intending to shut down an other system.

Ok, back to real work... in the garden and stuff.

Hein
Steve Reece_3
Trusted Contributor

Re: how to make shutdown.com reboot without asking questions everytime

As Hein says, that message comes up because you're not on the console of the system, you're SET HOSTed on most likely.

Beware that if you shutdown from certain networked sessions the shutdown is likely to hang when your session is disconnected. Kind of, "we're shutting down. Oh? What happened to the process that was shutting us down? We'd better wait and see what happens," and you have to go visit the computer room where the system is and either login on the console (if you can) or power cycle the box.
Hoff
Honored Contributor

Re: how to make shutdown.com reboot without asking questions everytime

There are posted examples of folks that have implemented local DCL-based solutions for a network-based SHUTDOWN, and there's also a fully-supported approach:

SYSMAN> SHUTDOWN NODE [/other-stuff]

With Apache running, it's also feasible to set up (for instance) a CGI shutdown command or, well, whatever. DCL is sufficiently capable to make that task feasible in a dozen or two lines of DCL.

Probably ten or twenty lines of DCL using DECnet, too, based on DCL DECnet task-to-task processing, too. Here's an example version that does almost all of what would be needed; everything but the SHUTDOWN itself:

http://h71000.www7.hp.com/wizard/wiz_0159.html

Some of those web-based tools HP is so fond of may (will?) have capabilities here, too, as will the OpenVMS Management Station, etc.

There are many ways to implement this.

And FWIW, there was a bug in the SHUTDOWN or the REBOOT symbols set in the system manager's LOGIN.COM in a release or two of OpenVMS, IIRC. (The argument order of one was briefly messed up, and this again from some dim memory.)

This SHUTDOWN stuff has been discussed; Google is your friend, and the manuals likely have fodder here, too.
Colin Butcher
Esteemed Contributor

Re: how to make shutdown.com reboot without asking questions everytime

How about this instead:

$ shutdown0 :== "mcr sysman shutdown node/min=0/noauto"

and:

$ reboot0 :== "mcr sysman shutdown node/min=0/auto"

or even (on IA64):

$ poweroff0 :== "mcr sysman shutdown node/min=0/noauto/power"

Or, why not set up special "shutdown", "reboot" and "poweroff" (IA64 only) accounts that someone can login to and that login will trigger an immediate shutdown / reboot / shutdown_and_poweroff. Make them privileged captive accounts, perhaps without passwords too!

Cheers, Colin.
Entia non sunt multiplicanda praeter necessitatem (Occam's razor).
Andy Bustamante
Honored Contributor

Re: how to make shutdown.com reboot without asking questions everytime

If you're enamored with GUI interfaces, with auto_action set to reboot you can request a crash from the Availability Manager which will lead to a system restart. No need to answer questions or worry about pesky application shutdown.

If you don't have time to do it right, when will you have time to do it over? Reach me at first_name + "." + last_name at sysmanager net
Scotty HD
Frequent Advisor

Re: how to make shutdown.com reboot without asking questions everytime

thanks everyone for help.

Scotty