Login.template silly problem... - VMS

This is a discussion on Login.template silly problem... - VMS ; Hello everyone, I've just noticed that there are some significant differences among the SYS$MANAGER:LOGIN.TEMPLATE files in V7.2 (both VAX and Alpha), V7.3 (VAX), V8.2 (Alpha), V8.3 (Alpha), and probably other releases as well. V7.x file contains the following: $ SHUTDOWN ...

+ Reply to Thread
Results 1 to 17 of 17

Thread: Login.template silly problem...

  1. Login.template silly problem...

    Hello everyone,

    I've just noticed that there are some significant differences among the
    SYS$MANAGER:LOGIN.TEMPLATE files in V7.2 (both VAX and Alpha), V7.3 (VAX),
    V8.2 (Alpha), V8.3 (Alpha), and probably other releases as well.

    V7.x file contains the following:

    $ SHUTDOWN == "@SYS$SYSTEM:SHUTDOWN 0 SHUTDOWN YES NO LATER NO NONE"
    $ REBOOT == "@SYS$SYSTEM:SHUTDOWN 0 SHUTDOWN YES NO LATER YES NONE"

    V8.x file instead contains:

    $ SHUTDOWN == "@SYS$SYSTEM:SHUTDOWN 0 SHUTDOWN NO YES LATER NO NONE"
    $ REBOOT == "@SYS$SYSTEM:SHUTDOWN 0 SHUTDOWN NO YES LATER YES NONE"

    Apart from different spacing, the third and fourth values are swapped, but
    it's my understanding that the SHUTDOWN.COM procedure parameters have not
    changed meaning or position since at least V4.x. Is that a by-design change?

    Am I right or I'm missing something? Does someone here can check on other
    releases (V5.x, AXP V1.x, V6.x) and confirm that the third parameter is about
    disk volumes spindown while the fourth one is about SYSHUTDWN.COM execution,
    no matter which is the actual operating system version and release?

    I'm wondering about how many sites are maybe using those wrong (?) definitions
    with no apparent side effects and if this has ever been noticed in field...

    Thanks,
    G.

  2. Re: Login.template silly problem...

    On Sep 30, 9:24*am, gerr...@no.spam.mail.com wrote:
    > Hello everyone,
    >
    > I've just noticed that there are some significant differences among the
    > SYS$MANAGER:LOGIN.TEMPLATE files in V7.2 (both VAX and Alpha), V7.3 (VAX),
    > V8.2 (Alpha), V8.3 (Alpha), and probably other releases as well.
    >
    > V7.x file contains the following:
    >
    > $ SHUTDOWN *== "@SYS$SYSTEM:SHUTDOWN 0 SHUTDOWN YES NO LATER NO NONE"
    > $ REBOOT == "@SYS$SYSTEM:SHUTDOWN 0 SHUTDOWN YES NO LATER YES NONE"
    >
    > V8.x file instead contains:
    >
    > $ *SHUTDOWN * * == "@SYS$SYSTEM:SHUTDOWN 0 SHUTDOWN NO YES LATER NO NONE"
    > $ *REBOOT * * * == "@SYS$SYSTEM:SHUTDOWN 0 SHUTDOWN NO YES LATER YES NONE"
    >
    > Apart from different spacing, the third and fourth values are swapped, but
    > it's my understanding that the SHUTDOWN.COM procedure parameters have not
    > changed meaning or position since at least V4.x. Is that a by-design change?
    >
    > Am I right or I'm missing something? Does someone here can check on other
    > releases (V5.x, AXP V1.x, V6.x) and confirm that the third parameter is about
    > disk volumes spindown while the fourth one is about SYSHUTDWN.COM execution,
    > no matter which is the actual operating system version and release?
    >
    > I'm wondering about how many sites are maybe using those wrong (?) definitions
    > with no apparent side effects and if this has ever been noticed in field....
    >
    > Thanks,
    > G.


    If you search SYS$SYSTEM:SHUTDOWN.COM you should be able to figure out
    what each param is for.

    Run commands such as

    $ SEARCH SHUTDOWN.COM /WINDOW /NUM "MANY MIN"

    Just search for substrings of the questions SHUTDOWN.COM as in the
    command above and you will know the answer to your question.

    AEF

  3. Re: Login.template silly problem...

    On Tue, 30 Sep 2008 07:41:58 -0700 (PDT), AEF wrote:


    > If you search SYS$SYSTEM:SHUTDOWN.COM you should be able to figure out
    > what each param is for.


    So, what's your opinion? A wrong template in V7.x? I was just curious about
    that and about historical variance (if any) of shutdown procedure parameters.
    Are you running a V6.x system? Is there that template? It's right or wrong?

    > Just search for substrings of the questions SHUTDOWN.COM as in the
    > command above and you will know the answer to your question.


    I did know that answer well before posting, and I'm almost sure that those
    parameters have never changed since day 1. I was just asking if there was
    someone willing to check the same thing in other releases as well. I'm not
    English native, maybe there was (is?) a communication problem...

    G.


  4. Re: Login.template silly problem...

    gerry77@no.spam.mail.com wrote:
    > On Tue, 30 Sep 2008 07:41:58 -0700 (PDT), AEF wrote:
    >
    >
    >> If you search SYS$SYSTEM:SHUTDOWN.COM you should be able to figure out
    >> what each param is for.

    >
    > So, what's your opinion? A wrong template in V7.x? I was just curious about
    > that and about historical variance (if any) of shutdown procedure parameters.
    > Are you running a V6.x system? Is there that template? It's right or wrong?
    >
    >> Just search for substrings of the questions SHUTDOWN.COM as in the
    >> command above and you will know the answer to your question.

    >
    > I did know that answer well before posting, and I'm almost sure that those
    > parameters have never changed since day 1. I was just asking if there was
    > someone willing to check the same thing in other releases as well. I'm not
    > English native, maybe there was (is?) a communication problem...
    >
    > G.
    >


    Well, it *is* a template. Why not just change it
    to suit your personal/site needs ?

  5. Re: Login.template silly problem...

    On Wed, 01 Oct 2008 13:33:54 GMT, Jan-Erik Söderholm
    wrote:

    > Well, it *is* a template. Why not just change it
    > to suit your personal/site needs ?


    Actually, I've just done that. A template is a template is a template, but
    this does not mean that it shouldn't be as much correct as possible, given
    that upon installation it gets copied to SYS$MANAGER:LOGIN.COM which, you
    know, is not a template... Or I'm supposed to spot all the template errors?

    Anyway I did discover that glitch while setting up a V4.7 (!) system which has
    no templates at all, and I was checking if parameters where the same as usual.
    Obviously I'm a Hobbyist, don't tell me to upgrade to something newer.

    G.


  6. Re: Login.template silly problem...

    gerry77@no.spam.mail.com wrote:


    > So, what's your opinion? A wrong template in V7.x? I was just curious
    > about that and about historical variance (if any) of shutdown procedure
    > parameters. Are you running a V6.x system? Is there that template? It's
    > right or wrong?


    Whatever was the reason to change the template, in my opinion both do it
    wrong:
    p3 (disk rundown) is the same for SHUTDOWN and REBOOT, but should be
    YES for SHUTDOWN, NO for REBOOT.
    And p4 (run syshutdwn) should always be YES.

    Anyway, defining these two commands should be removed from the template:
    only in case of local attached terminal or LAT login they will work.
    Most people either login through remote (telnet,ssh) or in a X11 session:
    in those cases the shutdown or reboot will only start the shutdown and then
    leave the system in an inconsistent state.

    My definitions look like this:

    $ SHUTDOWN :== @CLUSTER$MANAGERETACH_SHUTDOWN
    $ REBOOT :== @CLUSTER$MANAGERETACH_REBOOT

    where the detach_*.com files start a detached process doing the
    shutdown/reboot, so they can be used without knowing how I'm logged in.


    --
    Joseph Huber, http://www.huber-joseph.de

  7. Re: Login.template silly problem...

    In article , Joseph Huber
    writes:

    > Anyway, defining these two commands should be removed from the template:
    > only in case of local attached terminal or LAT login they will work.
    > Most people either login through remote (telnet,ssh) or in a X11 session:
    > in those cases the shutdown or reboot will only start the shutdown and then
    > leave the system in an inconsistent state.


    Actually, I have experience with a reboot via telnet. It worked several
    times. Was I just lucky?


  8. Re: Login.template silly problem...

    In article , helbig@astro.multiCLOTHESvax.de (Phillip Helbig---remove CLOTHES to reply) writes:
    > In article , Joseph Huber
    > writes:
    >
    >> Anyway, defining these two commands should be removed from the template:
    >> only in case of local attached terminal or LAT login they will work.
    >> Most people either login through remote (telnet,ssh) or in a X11 session:
    >> in those cases the shutdown or reboot will only start the shutdown and then
    >> leave the system in an inconsistent state.

    >
    > Actually, I have experience with a reboot via telnet. It worked several
    > times. Was I just lucky?


    Older systems had those problems. Currently telnet and X11 do not,
    but ssh may. If you go back far enough, you could do a shutdown from
    batch, but not from CTERM or RTPAD (DECnet terminal emulation).

    A long time ago changes to the batch system prevented doing it from
    batch. I have scripts that start detached processes to do it,
    and sometimes I submit those scripts to batch. Once the detached
    process has started it doesn't matter what happens to the batch job.

    I also have a detached process running on all my hobbyist systems
    that listens for a doorbell lock and a privileged program that rings
    that doorbell so my kids can bring the cluster up and down when they
    want without having privileges.


  9. Re: Login.template silly problem...

    On Wed, 1 Oct 2008 19:09:38 +0000 (UTC), helbig@astro.multiCLOTHESvax.de
    (Phillip Helbig---remove CLOTHES to reply) wrote:

    > > Anyway, defining these two commands should be removed from the template:
    > > only in case of local attached terminal or LAT login they will work.
    > > Most people either login through remote (telnet,ssh) or in a X11 session:
    > > in those cases the shutdown or reboot will only start the shutdown and then
    > > leave the system in an inconsistent state.

    >
    > Actually, I have experience with a reboot via telnet. It worked several
    > times. Was I just lucky?


    No, you weren't.

    The shutdown procedure first creates your process tree, if any: i.e., if you
    start shutdown from within a subprocess, it will create a list of PIDs
    representing the hierarchy from that subprocess up to and including the
    process created when you logged in. Then it will look for every process in the
    system and stop it if it is running with a UIC greater than [1,*], and if its
    name does not start with "DECW$", and if its name isn't "TCPIP$SSH_SSHD2", and
    if its PID isn't present in the previously built process tree.

    So, if you start shutdown from a telnet, ssh, DECwindows or DECnet connected
    session, it should finish correctly because neither TCP/IP main process (which
    run as [1,4]) nor ssh server or DECterm (because they are explicitly skipped)
    will be killed along the way. DECnet will be put in shut (not off) state so to
    disallow further activity without disrupting existing network links, and its
    main processes run in group 1 (NETACP as [1,4], REMACP and NET$ACP as [1,3]).
    LAT too does work the same because LATACP runs as [1,4] like many others.

    Instead, if you submit SHUTDOWN.COM for batch processing, you'll be in trouble
    because - well before the end of the procedure - it proceeds to stop all the
    queues and all the queue managers, so it would kill itself leaving the system
    in a weird state. To "batch" shutdown you must use a detached process as it
    will be comprised in the above mentioned process tree, thus protecting itself.

    Look for "job_tree" and "qman_name" in SHUTDOWN.COM and proceed from there.

    HTH,
    G.


  10. Re: Login.template silly problem...

    gerry77@no.spam.mail.com wrote:

    > So, if you start shutdown from a telnet, ssh, DECwindows or DECnet connected
    > session, it should finish correctly because neither TCP/IP main process (which
    > run as [1,4]) nor ssh server or DECterm (because they are explicitly skipped)
    > will be killed along the way.


    If your site shutdown procedure shuts down TCPIP Services as it should
    do, then your telnet session gets killed at that point.

  11. Re: Login.template silly problem...

    In article , Bob Koehler wrote:
    >In article , helbig@astro.multiCLOTHESvax.de (Phillip
    >Helbig---remove CLOTHES to reply) writes:
    >> In article , Joseph Huber
    >> writes:
    >>
    >>> Anyway, defining these two commands should be removed from the template:
    >>> only in case of local attached terminal or LAT login they will work.
    >>> Most people either login through remote (telnet,ssh) or in a X11 session:
    >>> in those cases the shutdown or reboot will only start the shutdown and then
    >>> leave the system in an inconsistent state.

    >>
    >> Actually, I have experience with a reboot via telnet. It worked several
    >> times. Was I just lucky?

    >
    > Older systems had those problems. Currently telnet and X11 do not,
    > but ssh may. If you go back far enough, you could do a shutdown from
    > batch, but not from CTERM or RTPAD (DECnet terminal emulation).


    As of V8.3, SHUTDOWN from TELNET and SSH work fine; I haven't attempted it from
    X11, but I will believe that it works.

    I don't know when the change took place, but once I was told of the change, I
    tried it , and it worked.
    [...]

  12. Re: Login.template silly problem...

    Joseph Huber wrote:
    >
    > gerry77@no.spam.mail.com wrote:
    >
    > > So, what's your opinion? A wrong template in V7.x? I was just curious
    > > about that and about historical variance (if any) of shutdown procedure
    > > parameters. Are you running a V6.x system? Is there that template? It's
    > > right or wrong?

    >
    > Whatever was the reason to change the template, in my opinion both do it
    > wrong:
    > p3 (disk rundown) is the same for SHUTDOWN and REBOOT, but should be
    > YES for SHUTDOWN, NO for REBOOT.
    > And p4 (run syshutdwn) should always be YES.
    >
    > Anyway, defining these two commands should be removed from the template:
    > only in case of local attached terminal or LAT login they will work.
    > Most people either login through remote (telnet,ssh) or in a X11 session:
    > in those cases the shutdown or reboot will only start the shutdown and then
    > leave the system in an inconsistent state.
    >
    > My definitions look like this:
    >
    > $ SHUTDOWN :== @CLUSTER$MANAGERETACH_SHUTDOWN
    > $ REBOOT :== @CLUSTER$MANAGERETACH_REBOOT
    >
    > where the detach_*.com files start a detached process doing the
    > shutdown/reboot, so they can be used without knowing how I'm logged in.


    I'd be interested in seeing your detached process proc.'s (.COMs).

    D.J.D.

  13. Re: Login.template silly problem...

    David J Dachtera wrote:

    > Joseph Huber wrote:
    >> My definitions look like this:
    >>
    >> $ SHUTDOWN :== @CLUSTER$MANAGERETACH_SHUTDOWN
    >> $ REBOOT :== @CLUSTER$MANAGERETACH_REBOOT
    >>
    >> where the detach_*.com files start a detached process doing the
    >> shutdown/reboot, so they can be used without knowing how I'm logged in.

    >
    > I'd be interested in seeing your detached process proc.'s (.COMs).


    Here is detached_shutdown.com, detached_reboot is the same, just REBOOT at
    the end:

    $ IF F$MODE() .EQS. "BATCH" THEN GOTO start_detached
    $ depth = F$ENVIRONMENT("DEPTH")
    $ IF depth .EQ. 0 THEN GOTO run_detached
    $start_detached:
    $ this_node=F$EDIT(F$GETSYI("NODENAME"),"COLLAPSE")
    $ date=F$CVTIME("","comparison","DATE")
    $ RUN SYS$SYSTEM:LOGINOUT.EXE -
    /INPUT='F$ENVIRONMENT("PROCEDURE")' -
    /OUTPUT='F$TRNLNM("SYS$LOGIN")'Shutdown_'this_node'_'date'.log -
    /ERROR='f$trnlnm("sys$login")'Shutdown_'this_node'_'date'.log -
    /PROC=SHUTDOWN -
    /DETACHED
    $ EXIT
    $run_detached:
    $ SHUTDOWN = "@SYS$SYSTEM:SHUTDOWN 0 SHUTDOWN YES YES LATER NO NONE"
    $ REBOOT = "@SYS$SYSTEM:SHUTDOWN 0 SHUTDOWN NO YES LATER YES REBOOT"
    $ REPL/ALL/BEL/URGENT "Detached SHUTDOWN of ''F$GETSYI("NODENAME")'. PID is
    ''F$GETJPI("","PID")'"
    $ SHUTDOWN

    DETACH_SHUTDOWN is just running loginout detached with the above proc as
    input.

    --
    Joseph Huber, http://www.huber-joseph.de

  14. Re: Login.template silly problem...

    On Oct 1, 7:58*pm, B...@rabbit.turquoisewitch.com (Brad Hamilton)
    wrote:
    > In article , Bob Koehler wrote:
    > >In article , hel...@astro.multiCLOTHESvax.de (Phillip
    > >Helbig---remove CLOTHES to reply) writes:
    > >> In article , Joseph Huber
    > >> writes:

    >
    > >>> Anyway, defining these two commands should be removed from the template:
    > >>> only in case of local attached terminal or LAT login they will work.
    > >>> Most people either login through remote (telnet,ssh) or in a X11 session:
    > >>> in those cases the shutdown or reboot will only start the shutdown and then
    > >>> leave the system in an inconsistent state.

    >
    > >> Actually, I have experience with a reboot via telnet. *It worked several
    > >> times. *Was I just lucky?

    >
    > > * Older systems had those problems. *Currently telnet and X11 do not,
    > > * but ssh may. *If you go back far enough, you could do a shutdown from
    > > * batch, but not from CTERM or RTPAD (DECnet terminal emulation).

    >
    > As of V8.3, SHUTDOWN from TELNET and SSH work fine; I haven't attempted it from
    > X11, but I will believe that it works.
    >
    > I don't know when the change took place, but once I was told of the change, I
    > tried it , and it worked.
    > [...]


    I run TCPware v5.3-3 on VMS v6.1 and v6.2 and shutdown via its telnet
    works fine.

    AEF

    AEF

  15. Re: Login.template silly problem...

    Brad Hamilton schrieb:

    > As of V8.3, SHUTDOWN from TELNET and SSH work fine; I haven't attempted it from
    > X11, but I will believe that it works.
    >
    > I don't know when the change took place, but once I was told of the change, I
    > tried it , and it worked.
    > [...]


    I believe a DECWindows session under a privileged account can do a shutdown.
    What I had in mind was my usual situation:
    From a session under my nonprivileged account, when a shutdown/reboot
    was necessary e.g. after a patch installation, from a DECTerm window
    logged in as system, shutdown will be killed because the underlying
    process holding the DECTerm window terminated.
    I won't test it, but I suppose it is still true.
    Therefore I always shutdown detached.

    --

    Joseph Huber - http://www.huber-joseph.de

  16. Re: Login.template silly problem...

    Joseph Huber wrote:

    > I believe a DECWindows session under a privileged account can do a shutdown.


    A decterm window on a workstation connected to the VMS host via TCPIP
    will be killed when the VMS host runs the TCPIP$SHUTDOWN.

    A decterm window connected via local transport to its own node will
    survive all the way to the end of the shutdown.

  17. Re: Login.template silly problem...

    Joseph Huber wrote:
    >
    > David J Dachtera wrote:
    >
    > > Joseph Huber wrote:
    > >> My definitions look like this:
    > >>
    > >> $ SHUTDOWN :== @CLUSTER$MANAGERETACH_SHUTDOWN
    > >> $ REBOOT :== @CLUSTER$MANAGERETACH_REBOOT
    > >>
    > >> where the detach_*.com files start a detached process doing the
    > >> shutdown/reboot, so they can be used without knowing how I'm logged in.

    > >
    > > I'd be interested in seeing your detached process proc.'s (.COMs).

    >
    > Here is detached_shutdown.com, detached_reboot is the same, just REBOOT at
    > the end:
    >
    > $ IF F$MODE() .EQS. "BATCH" THEN GOTO start_detached
    > $ depth = F$ENVIRONMENT("DEPTH")
    > $ IF depth .EQ. 0 THEN GOTO run_detached
    > $start_detached:
    > $ this_node=F$EDIT(F$GETSYI("NODENAME"),"COLLAPSE")
    > $ date=F$CVTIME("","comparison","DATE")
    > $ RUN SYS$SYSTEM:LOGINOUT.EXE -
    > /INPUT='F$ENVIRONMENT("PROCEDURE")' -
    > /OUTPUT='F$TRNLNM("SYS$LOGIN")'Shutdown_'this_node'_'date'.log -
    > /ERROR='f$trnlnm("sys$login")'Shutdown_'this_node'_'date'.log -
    > /PROC=SHUTDOWN -
    > /DETACHED
    > $ EXIT
    > $run_detached:
    > $ SHUTDOWN = "@SYS$SYSTEM:SHUTDOWN 0 SHUTDOWN YES YES LATER NO NONE"
    > $ REBOOT = "@SYS$SYSTEM:SHUTDOWN 0 SHUTDOWN NO YES LATER YES REBOOT"
    > $ REPL/ALL/BEL/URGENT "Detached SHUTDOWN of ''F$GETSYI("NODENAME")'. PID is
    > ''F$GETJPI("","PID")'"
    > $ SHUTDOWN
    >
    > DETACH_SHUTDOWN is just running loginout detached with the above proc as
    > input.


    *SIGH* I must be getting old. I was having trouble envisioning how to
    pass parameters to SHUTDOWN.COM in a detached process.

    My AIX-colleagues and their (single digits) years of experience are
    proving to be rather a challenge, and I'm afraid I'm starting to adopt
    the paradigms which arise from their limited experience/exposure.

    Nice code: simple, elegant, straight-forward.

    D.J.D.

+ Reply to Thread