[comp.unix.sysv386] Rebooting Sys V/386

dlucy@srs.UUCP (Doug Lucy) (03/24/91)

Is there a way to force a sys V/386 3.2 system to reboot?
I need to cause a reboot from a remote login after changing
the kernel with idbuild. Is there a way to do this with
just shutdown? Can it be done with a call to reset the system?

Thanks in advance.
-- 
: "It's such a fine line between clever..."             :    Doug Lucy :
: "...and stupid."                                      : S&R Software :
:                                                                      :
:                 UUCP: uunet!aplcomm!aplcen!wb3ffv!imladris!srs!dlucy :

les@chinet.chi.il.us (Leslie Mikesell) (03/27/91)

In article <419@srs.UUCP> dlucy@srs.UUCP (Doug Lucy) writes:
>Is there a way to force a sys V/386 3.2 system to reboot?
>I need to cause a reboot from a remote login after changing
>the kernel with idbuild. Is there a way to do this with
>just shutdown? Can it be done with a call to reset the system?

At least with AT&T's version, "init 6" will shut down and come
back up again.  Depending on the release, it may or may not stop
and ask at the console if your really want to come up again.

Les Mikesell
  les@chinet.chi.il.us

wcr@metro.tree.metrolink.com (W.c. Rothanburg) (03/27/91)

In article <419@srs.UUCP> dlucy@srs.UUCP (Doug Lucy) writes:

   Is there a way to force a sys V/386 3.2 system to reboot?
   I need to cause a reboot from a remote login after changing
   the kernel with idbuild. Is there a way to do this with
   just shutdown? Can it be done with a call to reset the system?

I know under ISC, and probablyy the rest too, you can issue an init 6
and the system will shutdown and reboot.  If somebody is on-line, you
might want to let them know as it bypasses the /etc/shutdown script.


Bill


--
Who  : Metro Link, Inc.
What : X11.R4. for ISC Unix 386/ix, SCO Unix/386, and Everex ESIX
Where: 2213 West Mc Nab Road, Pompano Beach,FL 33069
Sales: sales@metrolink.com
Email: wcr@metrolink.com
Phone: +1 305 970 7353 
Fax  : +1 305 970 7351

wilko@idca.tds.PHILIPS.nl (W.C. Bulte) (03/27/91)

try: init 6

On standard AT&T V/3.2 this forces an automatic reboot. Try it on your own
risk... :-)

_     __________________________________________________________________________
 |   / o / /  _   Wilko Bulte   Domain: wilko@idca.tds.philips.nl
 |/|/ / / /( (_)                uucp  : [mcsun,hp4nl]!philapd!wilko
* Philips Information Systems Nederland  phone: +31 55-432372 fax: +31 55-432103
      "Do, or do not. There is no 'try'" Yoda - The Empire Strikes Back
________________________________________________________________________________

src@scuzzy.in-berlin.de (Heiko Blume) (03/28/91)

dlucy@srs.UUCP (Doug Lucy) writes:

>Is there a way to force a sys V/386 3.2 system to reboot?
>I need to cause a reboot from a remote login after changing
>the kernel with idbuild. Is there a way to do this with
>just shutdown? Can it be done with a call to reset the system?

'init 6' will shutdown the system cleanly and reboot *without*
waiting for a keypress. of course the floppy drive must be
open/empty.
-- 
   Heiko Blume <-+-> src@scuzzy.in-berlin.de <-+-> (+49 30) 691 88 93 [voice!]
                  public UNIX source archive [HST V.42bis]:
        scuzzy Any ACU,f 38400 6919520 gin:--gin: nuucp sword: nuucp
                     uucp scuzzy!/src/README /your/home

tmh@prosun.first.gmd.de (Thomas Hoberg) (03/28/91)

In article <419@srs.UUCP>, dlucy@srs.UUCP (Doug Lucy) writes:
|> Is there a way to force a sys V/386 3.2 system to reboot?
|> I need to cause a reboot from a remote login after changing
|> the kernel with idbuild. Is there a way to do this with
|> just shutdown? Can it be done with a call to reset the system?
|> 
/etc/uadmin won't help there, because it only works from the console. However
the system call should work. It takes two arguments (command + function), which
are defined in /usr/include/sys/uadmin.h. Not having the documentation at hand
I guess it should be uadmin(A_SHUTDOWN, AD_BOOT) for you.
Should the new kernel and configuration fail to reach init level 3, you are out
in the cold, but I guess you know that...

-- tom
----
Thomas M. Hoberg   | UUCP: tmh@bigfoot.first.gmd.de  or  tmh%gmdtub@tub.UUCP
c/o GMD Berlin     |       ...!unido!tub!gmdtub!tmh (Europe) or
D-1000 Berlin 12   |       ...!unido!tub!tmh
Hardenbergplatz 2  |       ...!pyramid!tub!tmh (World)
Germany            | BITNET: tmh%DB0TUI6.BITNET@DB0TUI11 or
+49-30-254 99 160  |         tmh@tub.BITNET

jgd@Dixie.Com (John G. DeArmond) (03/28/91)

src@scuzzy.in-berlin.de (Heiko Blume) writes:

>>Is there a way to force a sys V/386 3.2 system to reboot?
>>I need to cause a reboot from a remote login after changing
>>the kernel with idbuild. Is there a way to do this with
>>just shutdown? Can it be done with a call to reset the system?

>'init 6' will shutdown the system cleanly and reboot *without*
>waiting for a keypress. of course the floppy drive must be
>open/empty.

I've found that on more systems than not, this does not work and
instead hangs the computer when it prepares to reboot after shuting down.
Why?  Got me.  Also, one should note that executing "uadmin 2 1", which
is what run state 6 does by default does not do a clean shutdown.  A much
better way is to take /etc/rc1 which is a script, and modify it to
orderly shut the system down.

On a related issue, a useful technique to recover a system unresponsive
to terminal or console input (a tcp/ip bug will do this, as will a  modem
chatting with a dumb port) is to place a powerfail entry in /etc/inittab,
have it run /etc/rc1 with the proper arguments, and then put up a small
daemon that will trap SIGHUP on a spare port and fire a SIGPWR at init
(process 1).  This is a trivial C program.   Then when you need recover
the system, you simply toggle carrier detect on that port and wait for
the system to shut down. 

John
-- 
John De Armond, WD4OQC        | "Purveyors of speed to the Trade"  (tm)
Rapid Deployment System, Inc. |  Home of the Nidgets (tm)
Marietta, Ga                  | 
{emory,uunet}!rsiatl!jgd      |"Politically InCorrect.. And damn proud of it  

bill@astph.UUCP (Bill Dripps) (03/29/91)

In article <8840@rsiatl.Dixie.Com> jgd@Dixie.Com (John G. DeArmond) writes:
>src@scuzzy.in-berlin.de (Heiko Blume) writes:
>
>>>Is there a way to force a sys V/386 3.2 system to reboot?
>
>>'init 6' will shutdown the system cleanly and reboot *without*
>
>I've found that on more systems than not, this does not work and
>instead hangs the computer when it prepares to reboot after shuting down.
>Why?  Got me.  Also, one should note that executing "uadmin 2 1", which

One reason we discovered (why do we always do it the hard way?) is that
large cache disk adapters do not have enough time to flush disk blocks to
the drive before the 'init 6' code jerks the reset line.

-- 
Bill Dripps         | attmail!astph!bill | astph!bill@attmail.com | 
814-234-8592 ext.31 | psuvax1!astph!bill | astph!bill@psu.cs.edu  | 

cpcahil@virtech.uucp (Conor P. Cahill) (03/29/91)

dlucy@srs.UUCP (Doug Lucy) writes:
>Is there a way to force a sys V/386 3.2 system to reboot?
>I need to cause a reboot from a remote login after changing
>the kernel with idbuild. Is there a way to do this with
>just shutdown? Can it be done with a call to reset the system?

cd /
/etc/shutdown -g0 -y -i6 < /dev/console > /dev/console 2>&1 &

-- 
Conor P. Cahill            (703)430-9247        Virtual Technologies, Inc.
uunet!virtech!cpcahil                           46030 Manekin Plaza, Suite 160
                                                Sterling, VA 22170 

cpcahil@virtech.uucp (Conor P. Cahill) (03/29/91)

tmh@prosun.first.gmd.de (Thomas Hoberg) writes:

>/etc/uadmin won't help there, because it only works from the console. However
>the system call should work. It takes two arguments (command + function), which
>are defined in /usr/include/sys/uadmin.h. Not having the documentation at hand
>I guess it should be uadmin(A_SHUTDOWN, AD_BOOT) for you.

You don't want to do this because uadmin(2) only attempts to unmount root
and then locks up the system.  No other file systems are unmounted, no
SIGTERMs are sent to processes, so the system will end up quite messed up 
when you do reboot it.

-- 
Conor P. Cahill            (703)430-9247        Virtual Technologies, Inc.
uunet!virtech!cpcahil                           46030 Manekin Plaza, Suite 160
                                                Sterling, VA 22170 

toma@swsrv1.uucp (Tom Armistead) (03/29/91)

In article <563@bigfoot.first.gmd.de> tmh@prosun.first.gmd.de (Thomas Hoberg) writes:
>In article <419@srs.UUCP>, dlucy@srs.UUCP (Doug Lucy) writes:
>|> Is there a way to force a sys V/386 3.2 system to reboot?
>|> I need to cause a reboot from a remote login after changing
>|> the kernel with idbuild. Is there a way to do this with
>|> just shutdown? Can it be done with a call to reset the system?
>|> 

You CAN use shutdown - just re-direct input from /dev/console:
   e.g.  # shutdown -i6 -g0 -y </dev/console

-i6 says rebiit
-g0 says shutdown immediately (no grace period)
-y  says don't ask me 'ary you sure?'  - This is important since input is no
    longer coming form the terminal that you're on.

Tom
-- 
Tom Armistead - Software Services - 2918 Dukeswood Dr. - Garland, Tx  75040
===========================================================================
{void,egsner}!swsrv1!toma                           mic!ozdaltx!swsrv1!toma
{uunet,smu,ames}!sulaco!ozdaltx!swsrv1!toma

max@compaq.com (Max Heffler@Compaq Computer Corp.) (03/29/91)

les@chinet.chi.il.us (Leslie Mikesell) writes:

>In article <419@srs.UUCP> dlucy@srs.UUCP (Doug Lucy) writes:
>>Is there a way to force a sys V/386 3.2 system to reboot?

>At least with AT&T's version, "init 6" will shut down and come

With Interactive try:

/etc/shutdown -g0 -y -i6 </dev/console

this is my fastboot script...
--
Max Heffler, Senior Software Engineer        internet: max@compaq.com
Compaq Computer Corporation     uucp: ..!uunet!max@compaq.com
P.O. Box 692000 - M050701       phone: (713) 378-8366
Houston, Texas  77269-2000      fax:   (713) 374-7305

tmh@prosun.first.gmd.de (Thomas Hoberg) (03/29/91)

In article <1991Mar28.173232.1409@virtech.uucp>, cpcahil@virtech.uucp (Conor P. Cahill) writes:
|> tmh@prosun.first.gmd.de (Thomas Hoberg) writes:
|> 
|> >/etc/uadmin won't help there, because it only works from the console. However
|> >the system call should work. It takes two arguments (command + function), which
|> >are defined in /usr/include/sys/uadmin.h. Not having the documentation at hand
|> >I guess it should be uadmin(A_SHUTDOWN, AD_BOOT) for you.
|> 
|> You don't want to do this because uadmin(2) only attempts to unmount root
|> and then locks up the system.  No other file systems are unmounted, no
|> SIGTERMs are sent to processes, so the system will end up quite messed up 
|> when you do reboot it.
|> 
|> -- 
|> Conor P. Cahill            (703)430-9247        Virtual Technologies, Inc.
|> uunet!virtech!cpcahil                           46030 Manekin Plaza, Suite 160
|>                                                 Sterling, VA 22170 
I was under the impression that the guy knew what he was doing. He would have to
do the killing and umounting himself.
The problem with all methods mentioned so far is, that they won't work with a 
*remote* login (which he required). Now I don't think it's a very good idea at all
to do configuration changes remotely, but obviously he had no choice. I don't know
whether the system call uadmin will in some variation do without the
"press any key to reboot" prompt on the console or not. I didn't want to try.
If uadmin won't do that and *if* he absolutely requires remote reboot he can
still send a reset-toggle command to the keyboard controller at I/O address 64/60
(some tweaking of the I/O permission bitmap might be required). Naturally he has
to effectively halt the system first *and* the system better come up correctly.
If there is any kind of failure, chances are he won't be able to do any more
remote logins... 
-- tom
----
Thomas M. Hoberg   | UUCP: tmh@bigfoot.first.gmd.de  or  tmh%gmdtub@tub.UUCP
c/o GMD Berlin     |       ...!unido!tub!gmdtub!tmh (Europe) or
D-1000 Berlin 12   |       ...!unido!tub!tmh
Hardenbergplatz 2  |       ...!pyramid!tub!tmh (World)
Germany            | BITNET: tmh%DB0TUI6.BITNET@DB0TUI11 or
+49-30-254 99 160  |         tmh@tub.BITNET

src@scuzzy.in-berlin.de (Heiko Blume) (03/29/91)

jgd@Dixie.Com (John G. DeArmond) writes:

>src@scuzzy.in-berlin.de (Heiko Blume) writes:

>>>Is there a way to force a sys V/386 3.2 system to reboot?

>>'init 6' will shutdown the system cleanly and reboot *without*
>>waiting for a keypress. of course the floppy drive must be
>>open/empty.

>I've found that on more systems than not, this does not work and
>instead hangs the computer when it prepares to reboot after shuting down.

if it's pretends to be a System V/386 Release 3.2 (which the original
poser has asked for) it better should.
AT&T Sys Admin Reference Manual, init(1M):

[init] 6  Stop the unix system and reboot to the state defined
          by the 'initdefault' entry in /etc/inittab.

that's as clear as it can be.
-- 
   Heiko Blume <-+-> src@scuzzy.in-berlin.de <-+-> (+49 30) 691 88 93 [voice!]
                  public UNIX source archive [HST V.42bis]:
        scuzzy Any ACU,f 38400 6919520 gin:--gin: nuucp sword: nuucp
                     uucp scuzzy!/src/README /your/home

src@scuzzy.in-berlin.de (Heiko Blume) (03/29/91)

bill@astph.UUCP (Bill Dripps) writes:
>One reason we discovered (why do we always do it the hard way?) is that
>large cache disk adapters do not have enough time to flush disk blocks to
>the drive before the 'init 6' code jerks the reset line.

i KNEW using those cache-suckers is risky, that's why i don't use them.
(altho i think the ones with battery backed up ram won't discard the cache's
contents on reset.)
-- 
   Heiko Blume <-+-> src@scuzzy.in-berlin.de <-+-> (+49 30) 691 88 93 [voice!]
                  public UNIX source archive [HST V.42bis]:
        scuzzy Any ACU,f 38400 6919520 gin:--gin: nuucp sword: nuucp
                     uucp scuzzy!/src/README /your/home

src@scuzzy.in-berlin.de (Heiko Blume) (03/29/91)

tmh@prosun.first.gmd.de (Thomas Hoberg) writes:

>In article <419@srs.UUCP>, dlucy@srs.UUCP (Doug Lucy) writes:
>|> Is there a way to force a sys V/386 3.2 system to reboot?
>|> I need to cause a reboot from a remote login after changing
>|> the kernel with idbuild. Is there a way to do this with
>|> just shutdown? Can it be done with a call to reset the system?
>|> 
>/etc/uadmin won't help there, because it only works from the console.

if you had asked a good unix admin, you'd have learned that you can
cause any terminal to become the console (syscon) by issueing 'init s'.

>Should the new kernel and configuration fail to reach init level 3, you are out
>in the cold, but I guess you know that...

if he doesn't login via tcp/ip level 2 will suffice. if he built a new
kernel he must make sure that the new /etc/inittab makes init respawn
a getty on the port to be used, too (see idmkinit(1M)).
-- 
   Heiko Blume <-+-> src@scuzzy.in-berlin.de <-+-> (+49 30) 691 88 93 [voice!]
                  public UNIX source archive [HST V.42bis]:
        scuzzy Any ACU,f 38400 6919520 gin:--gin: nuucp sword: nuucp
                     uucp scuzzy!/src/README /your/home

dougm@ico.isc.com (Doug McCallum) (03/29/91)

In article <570@bigfoot.first.gmd.de> tmh@prosun.first.gmd.de (Thomas Hoberg) writes:
...
>I was under the impression that the guy knew what he was doing. He would have to
>do the killing and umounting himself.

Probably a bad assumption anytime. :-)

>The problem with all methods mentioned so far is, that they won't work with a 
>*remote* login (which he required). Now I don't think it's a very good idea at all
>to do configuration changes remotely, but obviously he had no choice. I don't know

To do a reboot when remotely logged in, it is only neccessary to convince
the system you are on the console.  I reboot across a network all the time.
To do this, simply do the following (in a shell script if you like):

	cd /
	shutdown -g0 -y -i6 </dev/console

Don't logout, let the shutdown throw you off the system.  A logout will
result in the shutdown being killed.

Doug McCallum
Interactive Systems Corp.
dougm@ico.isc.com

src@scuzzy.in-berlin.de (Heiko Blume) (03/30/91)

[please write lines <80 chars....]

tmh@prosun.first.gmd.de (Thomas Hoberg) writes:
>I was under the impression that the guy knew what he was doing.
> He would have to do the killing and umounting himself.

unmounting yes, killing no (RTFM).

>The problem with all methods mentioned so far is, that they won't work with a 
>*remote* login (which he required). 

again, that is not correct.

friendly make-double-sure ultra-clean cookbook method [from remote -sh as root]:

cd /
echo "LOGOUT IMMEDIATELY!" | /etc/wall
sleep 60
/etc/killall
init s
/etc/umountall
init 6
-- 
   Heiko Blume <-+-> src@scuzzy.in-berlin.de <-+-> (+49 30) 691 88 93 [voice!]
                  public UNIX source archive [HST V.42bis]:
        scuzzy Any ACU,f 38400 6919520 gin:--gin: nuucp sword: nuucp
                     uucp scuzzy!/src/README /your/home

det@hawkmoon.MN.ORG (Derek E. Terveer) (03/31/91)

les@chinet.chi.il.us (Leslie Mikesell) writes:

>At least with AT&T's version, "init 6" will shut down and come
>back up again.  Depending on the release, it may or may not stop
>and ask at the console if your really want to come up again.

In Esix, "init 5", which is supposed to go to the firmware
monitor, also reboots the system.  I suppose it depends on just
what the firmware monitor does at that point.  It will probably
work on most 80386 systems, albeit "init 6" is the way to go.
-- 
Derek "Tigger" Terveer	det@hawkmoon.MN.ORG -- U of MN Women's Lax
I am the way and the truth and the light, I know all the answers; don't need
your advice.  -- "I am the way and the truth and the light" -- The Legendary Pink Dots

pat@rwing.UUCP (Pat Myrto) (03/31/91)

In article <570@bigfoot.first.gmd.de> tmh@prosun.first.gmd.de (Thomas Hoberg) writes:
>        [ lots of previous thread deleted ... ]
>I don't know
>whether the system call uadmin will in some variation do without the
>"press any key to reboot" prompt on the console or not. I didn't want to try.

There HAS to be some way to do the reboot without the hang on the
"press any key to reboot" msg: running fsck -b on the root partition
returns the msg SYSTEM WILL REBOOT AUTOMATICALLY, and the reboot
starts without requiring ANY user intervention, no pause for pressing
a key, or anything.  Probably whatever call fsck -b makes is what the
party wants...  perhaps some variant of the uadmin(2) call?
-- 
pat@rwing                                       (Pat Myrto),  Seattle, WA
                            ...!uunet!pilchuck!rwing!pat
      ...!uw-beaver!uw-entropy!dataio!/
WISDOM:    "Travelling unarmed is like boating without a life jacket" 

mike@cimcor.mn.org (Michael Grenier) (03/31/91)

From article <1991Mar29.134732.11457@scuzzy.in-berlin.de>, by src@scuzzy.in-berlin.de (Heiko Blume):
> bill@astph.UUCP (Bill Dripps) writes:
>>One reason we discovered (why do we always do it the hard way?) is that
>>large cache disk adapters do not have enough time to flush disk blocks to
>>the drive before the 'init 6' code jerks the reset line.
> 
> i KNEW using those cache-suckers is risky, that's why i don't use them.
> (altho i think the ones with battery backed up ram won't discard the cache's
> contents on reset.)
> -- 

I'm confused. Why not just modify the rc script on shutdown to add a little
time. The inittab entry on this ESIX box simply kills the processes
and run /etc/unmountall (from /etc/rc0) before calling uadmin to reset
the box. Why not add a sleep statement before the end of /etc/rc0?

     -Mike Grenier
     mike@cimcor.mn.org

det@hawkmoon.MN.ORG (Derek E. Terveer) (04/02/91)

mike@cimcor.mn.org (Michael Grenier) writes:

>From article <1991Mar29.134732.11457@scuzzy.in-berlin.de>, by src@scuzzy.in-berlin.de (Heiko Blume):
>> bill@astph.UUCP (Bill Dripps) writes:
>>>large cache disk adapters do not have enough time to flush disk blocks to
>>>the drive before the 'init 6' code jerks the reset line.
>> 
>> i KNEW using those cache-suckers is risky, that's why i don't use them.
>> (altho i think the ones with battery backed up ram won't discard the cache's
>> contents on reset.)

>I'm confused. Why not just modify the rc script on shutdown to add a little
>time. The inittab entry on this ESIX box simply kills the processes
>and run /etc/unmountall (from /etc/rc0) before calling uadmin to reset
>the box. Why not add a sleep statement before the end of /etc/rc0?

A sleep may not be enough -- perhaps a few syncs followed by a sleep?
-- 
Derek "Tigger" Terveer	det@hawkmoon.MN.ORG -- U of MN Women's Lax
I am the way and the truth and the light, I know all the answers; don't need
your advice.  -- "I am the way and the truth and the light" -- The Legendary Pink Dots

rad@genco.bungi.com (Bob Daniel) (04/02/91)

In article <253@rwing.UUCP> pat@rwing.UUCP (Pat Myrto) writes:
>In article <570@bigfoot.first.gmd.de> tmh@prosun.first.gmd.de (Thomas Hoberg) writes:
>>        [ lots of previous thread deleted ... ]
>>I don't know
>>whether the system call uadmin will in some variation do without the
>>"press any key to reboot" prompt on the console or not. I didn't want to try.
>
>There HAS to be some way to do the reboot without the hang on the
>"press any key to reboot" msg: running fsck -b on the root partition
>returns the msg SYSTEM WILL REBOOT AUTOMATICALLY, and the reboot
>starts without requiring ANY user intervention, no pause for pressing
>a key, or anything.  Probably whatever call fsck -b makes is what the
>party wants...  perhaps some variant of the uadmin(2) call?
>-- 

For AT&T SysV 3.2.3, a simple:
shutdown -y -g0 -i6
will reboot the system.  'g' being the grace period before shutdown starts.

If you want to do it remotely or on another terminal, copy /etc/shutdown
to say /etc/shutdown2, strip out the portion that checks that you are
on /dev/console.  Then do
shutdown2 -y -g0 -i6

This gives you shutdown with reboot on any port (as long as you are 'su').

tmh@prosun.first.gmd.de (Thomas Hoberg) (04/04/91)

In article <602@genco.bungi.com>, rad@genco.bungi.com (Bob Daniel) writes:
|> In article <253@rwing.UUCP> pat@rwing.UUCP (Pat Myrto) writes:
|> >In article <570@bigfoot.first.gmd.de> tmh@prosun.first.gmd.de (Thomas Hoberg) writes:
|> >>        [ lots of previous thread deleted ... ]
|> >>I don't know
|> >>whether the system call uadmin will in some variation do without the
|> >>"press any key to reboot" prompt on the console or not. I didn't want to try.
|> >
|> >There HAS to be some way to do the reboot without the hang on the
|> >"press any key to reboot" msg: running fsck -b on the root partition
|> >returns the msg SYSTEM WILL REBOOT AUTOMATICALLY, and the reboot
|> >starts without requiring ANY user intervention, no pause for pressing
|> >a key, or anything.  Probably whatever call fsck -b makes is what the
|> >party wants...  perhaps some variant of the uadmin(2) call?
|> >-- 
|> 
|> For AT&T SysV 3.2.3, a simple:
|> shutdown -y -g0 -i6
|> will reboot the system.  'g' being the grace period before shutdown starts.
|> 
|> If you want to do it remotely or on another terminal, copy /etc/shutdown
|> to say /etc/shutdown2, strip out the portion that checks that you are
|> on /dev/console.  Then do
|> shutdown2 -y -g0 -i6
|> 
|> This gives you shutdown with reboot on any port (as long as you are 'su').
Well to round this out and get it done with:
If you look at /etc/inittab you should see a line like

"rb:6:wait:/etc/uadmin 2 1 >/dev/console 2>&1 </dev/console"

(At least) two things can be seen from that line:

1. uadmin 2 1 (as opposed to uadmin 2 0, which is used ordinarily in shutdown)
   will reboot without asking to "press any key to reboot"

2. even though the program 'uadmin' (as opposed to the system call uadmin() )
   checks for standard input to come from the console, this is being taken care
   of by the redirection from /dev/console

This is why the solutions promoted by Heiko Blume et.al. and the one given above
work. The check is in the uadmin program so there is no way and indeed no need
to remove the check (other than rewriting uadmin) and 'shutdown2' is unneccessary.

Two more notes: Even though it turns out to be unneccessary, it would be possible
to write a user level program to reboot the computer remotely without harm. One
of the few design principles that went into UNIX and that hasn't been muddied yet,
is that any user level programm can anything that any other can. "All UNIX 
processes were created equal" or there is nothing that only dedicated processes
can do (well almost, there is always process 0). 'umount()' is available to 
unmount file systems and kill(15, -1) resp. kill(9, -1) for diehards, can be used
to get rid of all other processes. uadmin(2, 0) would then do the reboot...

"why do it simple, when you could have so much fun programming (and debugging)
 it?"

-- tom 
----
Thomas M. Hoberg   | UUCP: tmh@bigfoot.first.gmd.de  or  tmh%gmdtub@tub.UUCP
c/o GMD Berlin     |       ...!unido!tub!gmdtub!tmh (Europe) or
D-1000 Berlin 12   |       ...!unido!tub!tmh
Hardenbergplatz 2  |       ...!pyramid!tub!tmh (World)
Germany            | BITNET: tmh%DB0TUI6.BITNET@DB0TUI11 or
+49-30-254 99 160  |         tmh@tub.BITNET