[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [ezjail] Non-interactive use of ezjail-admin update -P (revisited)

Hello to all, hope you are,unlike me, in vacation.

I just updated to ezjail-2.1 which according to the Changelog fixes the
issue of update -P calling portsnap with the fetch option instead of the
cron option when called non-interactively.

This is the part of the code which does that.

line 181 at ezjail-admin

    [ -z "$TERM" -o "$TERM" = dumb ] && _portsnap_fetch="cron"
    portsnap ${_portsnap_fetch}

Now this works beautifully from cron, however it does not work when
connecting remotely with ssh.

The reason is

workstation:~$ ssh server echo $TERM

This happens because the ssh client pushes the variable to the server so
it is never a zero-length string ( could be the string "dumb" in some
cases but dunno when).

And the question is:

Is the execution of a command over ssh( but never getting an actual
shell as a user) a non-interactive or an interactive use ?

If my opinion is of any use, I tend to consider it a non-interactive use
and think something like this is more appropriate:

  ! [ -t 0 ] && _portsnap_fetch="cron"

What say ye ?

Keep up the good work (or the good time for that matter,I know I intend
to in the next days)

Alexandros Kosiaris 	Network Management Center , NTUA
e-mail : alex AT noc.ntua DOT gr
Public Key Fingerprint :
D6B1 0634 BE65 719C 6C95  7492 8201 4B46 C478 F074

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature