First you get bootshell.cc from
http://reason.marist.edu/patches/bootshell-1.3.cc, and compile it and
install it on your Linux system. Then you can use a REXX EXEC like:

/*
***********************************************************************
*        Identify Focus and Linux servers.                            *
***********************************************************************
*/
"PIPE (endchar $ name find_server)",
   "cp QUERY NAMES",
   "| split ,",
   "| strip",
   "| a: find FOCS",
   "| specs word 1 1",
   "| stem focus.",
   "$",
   "a:",
   "| find LINUX",
   "| specs word 1 1",
   "| stem linux."
if rc > maxrc then do
   maxrc = rc
   say "===> PIPE to find Focus and Linux servers failed. RC =" rc
end
/*
***********************************************************************
*        Shutdown LINUX. (Part 1)                                     *
***********************************************************************
*/
do i = 1 for linux.0
   parse value diag("08","QUERY USER" linux.i) with . 12 terminal 15 .
   if terminal = "DSC" then do
      "CP SET SECUSER" linux.i "*"
      if rc > maxrc then do
         maxrc = rc
         say "===> Could not establish secondary console for" linux.i,
            "RC =" rc
      end
      dummy = diag("08","SEND" linux.i "HALT")
      "CP SLEEP 2 SEC"
      "CP SET SECUSER" linux.i "OFF"
   end
end
/*
***********************************************************************
*        Shutdown LINUX. (Part 2)                                     *
***********************************************************************
*/
"CP SLEEP 30 SEC"
do i = 1 for linux.0
   parse value diag("08","QUERY USER" linux.i) with . 12 terminal 15 .
   if terminal = "DSC" then "CP FORCE" linux.i
   if rc > maxrc then do
      maxrc = rc
      say "===> Could not FORCE Linux server" linux.i "RC =" rc
   end
end

This is a fragment from our AUTOSHUT EXEC which runs at VM shutdown to
gracefully end a whole bunch of servers.

Bootshell provides a replacement shell for the Linux virtual console on VM
which accepts two commands: 'login' and 'halt'. This allows us to issue the
halt command without a password. This works safely since the virtual console
is secured by the password of the Linux virtual machine or, in this case,
because it is being accessed through the VM secondary console facility
(SCIF) by a class A user.

I don't believe you have VM, so this EXEC isn't much help, but you may find
bootshell useful if the console for your Linux is in a secure area.

> -----Original Message-----
> From: James Melin [SMTP:[EMAIL PROTECTED]]
> Sent: Monday, April 22, 2002 10:12 AM
> To:   [EMAIL PROTECTED]
> Subject:      Re: Use of REXEC or RSH?
>
> Peter Webb:
>
> Could you detail exactly how you do this? I've never heart of that
> bootshell.
>
>
>
> |---------+---------------------------->
> |         |           "Peter Webb,     |
> |         |           Toronto Transit  |
> |         |           Commission"      |
> |         |           <[EMAIL PROTECTED]|
> |         |           a>               |
> |         |           Sent by: Linux on|
> |         |           390 Port         |
> |         |           <[EMAIL PROTECTED]|
> |         |           IST.EDU>         |
> |         |                            |
> |         |                            |
> |         |           04/22/2002 08:56 |
> |         |           AM               |
> |         |           Please respond to|
> |         |           Linux on 390 Port|
> |         |                            |
> |---------+---------------------------->
>
> >-------------------------------------------------------------------------
> -------------------------------------|
>   |
> |
>   |       To:       [EMAIL PROTECTED]
> |
>   |       cc:
> |
>   |       Subject:  Re: Use of REXEC or RSH?
> |
>
> >-------------------------------------------------------------------------
> -------------------------------------|
>
>
>
>
> I am using a REXX EXEC running on CMS in combination with Mike Kershaw's
> bootshell on Linux to manage Linux termination. Simple, works well, and I
> don't have to worry about passwords.
>
> > -----Original Message-----
> > From: Lionel Dyck [SMTP:[EMAIL PROTECTED]]
> > Sent: Monday, April 22, 2002 9:31 AM
> > To:   [EMAIL PROTECTED]
> > Subject:      Use of REXEC or RSH?
> >
> > I've been trying to think of a way to automate the shutdown of my linux
> > servers under z/vm and the thought of using rexec or rsh came to mind.
> > Before doing so what is the collective wisdom of the list?  Is this a
> > worthwhile option to pursue? Are there any pros/cons to one or the
> other?
> >
> > Any tips on enabling or controlling?
> >
> > thanks
> > --------------------------------------------------------------------
> > Lionel B. Dyck, Systems Software Lead
> > Kaiser Permanente Information Technology
> > 25 N. Via Monte Ave
> > Walnut Creek, Ca 94598
> >
> > Phone:   (925) 926-5332 (tie line 8/473-5332)
> > E-Mail:    [EMAIL PROTECTED]
> > Sametime: (use Lotus Notes address)
> > AIM:        lbdyck

Reply via email to