Operating System - OpenVMS
1753454 Members
6109 Online
108794 Solutions
New Discussion юеВ

Re: 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.