• Exec statement

    From Fabio Bizzi@2:335/364.1 to All on Thu Nov 7 14:31:20 2019
    Hello All!

    I'm trying to execute a shell script with binkd on a file receive but it doesn't work. :(

    The config is this:

    exec "/home/husky/bin/netsegments.sh" net33?.???

    I'm sending the file named net335.312 from my point and this is the log at the receiving node:

    - 07 Nov 14:34:40 [15148] SYS Office Point
    - 07 Nov 14:34:40 [15148] ZYZ Fabio Bizzi
    - 07 Nov 14:34:40 [15148] LOC Roma, Italia
    - 07 Nov 14:34:40 [15148] NDL 115200,TCP,BINKP
    - 07 Nov 14:34:40 [15148] TIME Thu, 7 Nov 2019 14:34:39 +0100
    - 07 Nov 14:34:40 [15148] VER binkd/1.1a-96/Linux binkp/1.1
    + 07 Nov 14:34:40 [15148] addr: 2:335/364.1@fidonet
    - 07 Nov 14:34:40 [15148] OPT NDA EXTCMD CRYPT GZ
    + 07 Nov 14:34:40 [15148] Remote supports asymmetric ND mode
    + 07 Nov 14:34:40 [15148] Remote supports EXTCMD mode
    + 07 Nov 14:34:40 [15148] Remote requests CRYPT mode
    + 07 Nov 14:34:40 [15148] Remote supports GZ mode
    - 07 Nov 14:34:40 [15148] TRF 0 389
    + 07 Nov 14:34:40 [15148] Remote has 0b of mail and 389b of files for us
    + 07 Nov 14:34:40 [15148] pwd protected session (MD5)
    - 07 Nov 14:34:40 [15148] session in CRYPT mode
    - 07 Nov 14:34:40 [15148] receiving net335.312 (389 byte(s), off 0)
    + 07 Nov 14:34:40 [15148] net335.312 -> /home/husky/in.sec/net335.312
    + 07 Nov 14:34:40 [15148] rcvd: net335.312 (389, 389.00 CPS, 2:335/364.1@fidonet)
    + 07 Nov 14:34:40 [15148] done (from 2:335/364.1@fidonet, OK, S/R: 0/1 (0/389 bytes))
    07 Nov 14:34:40 [15148] session closed, quitting...
    07 Nov 14:34:40 [23009] rc(15148)=0

    Obviusly the shell script wasn't executed. :(

    Where am I wromg?

    P.S. These other exec statements are working fine.

    exec "/home/husky/bin/mfreq-srif -c /home/husky/mfreq/etc/srif.cfg -s *S" *.req exec "/home/husky/bin/mailin.sh" *.su? *.mo? *.tu? *.we? *.th? *.fr? *.sa? *.tic *.pkt


    Thanks! :)

    Ciao!
    Fabio

    --- GoldED+/LNX 1.1.5-b20180707
    * Origin: ]\/[imac Rebirth Boss Point (2:335/364.1)
  • From Paul Quinn@3:640/1384 to Fabio Bizzi on Thu Nov 7 23:59:28 2019
    Hi! Fabio,

    On 07 Nov 19 14:31, you wrote to All:

    I'm trying to execute a shell script with binkd on a file receive but
    it doesn't work. :(

    The config is this:
    exec "/home/husky/bin/netsegments.sh" net33?.???

    Would a target of net33* do any better?

    HTH.

    Cheers,
    Paul.

    ... "Too much of a good thing is wonderful", Mae West.
    --- GoldED+/LNX 1.1.5-b20130515
    * Origin: Quinn's Rock - Live from Paul's Xubuntu desktop! (3:640/1384)
  • From Fabio Bizzi@2:335/364.1 to Paul Quinn on Thu Nov 7 15:42:52 2019
    Hello Paul!

    07 Nov 19 23:59, you wrote to me:

    I'm trying to execute a shell script with binkd on a file receive
    but it doesn't work. :(

    The config is this:
    exec "/home/husky/bin/netsegments.sh" net33?.???

    Would a target of net33* do any better?

    Tried, no way.

    BTW I did it at last, I've had to add the full path of the received file.
    It sounds a bit strange because the other exec statements works without the full path added. :/

    This Works:
    exec "/home/husky/bin/netsegments.sh" /home/husky/in.sec/net33?.???

    This doesent work:
    exec "/home/husky/bin/netsegments.sh" net33?.???

    This always works:
    exec "/home/husky/bin/mailin.sh" *.su? *.mo? *.tu? *.we? *.th? *.fr? *.sa? *.tic *.pkt

    Ciao!
    Fabio

    --- GoldED+/LNX 1.1.5-b20180707
    * Origin: ]\/[imac Rebirth Boss Point (2:335/364.1)
  • From Paul Quinn@3:640/1384.125 to Fabio Bizzi on Fri Nov 8 08:09:52 2019
    Hi! Fabio,

    On 11/08/2019 12:42 AM, you wrote:

    BTW I did it at last, I've had to add the full path of the received file. It sounds a bit strange because the other exec statements works without the full path added. :/

    This Works:
    exec "/home/husky/bin/netsegments.sh" /home/husky/in.sec/net33?.???

    That's one way of looking at it. If your script knows where to look every time, you win. Because the binkD setting is only a trigger.

    OTOH. I share your frustration. It would be nice if binkD was consistent.

    Cheers,
    Paul.

    --- Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Thunderbird/31.4.0
    * Origin: Right Rudder, Left Stick. Wheeeeeee! (3:640/1384.125)
  • From Kees van Eeten@2:280/5003.4 to Fabio Bizzi on Fri Nov 8 00:17:10 2019
    Hello Fabio!

    07 Nov 19 15:42, you wrote to Paul Quinn:

    This Works:
    exec "/home/husky/bin/netsegments.sh" /home/husky/in.sec/net33?.???

    This doesent work:
    exec "/home/husky/bin/netsegments.sh" net33?.???

    This always works:
    exec "/home/husky/bin/mailin.sh" *.su? *.mo? *.tu? *.we? *.th? *.fr? *.sa? *.tic *.pkt

    Those files have wildcard that includes the full path
    */net33?.??? should work as well.

    Kees

    --- GoldED+/LNX 1.1.5--b20180707
    * Origin: As for me, all I know is that, I know nothing. (2:280/5003.4)
  • From Fabio Bizzi@2:335/364.1 to Kees van Eeten on Fri Nov 8 09:46:38 2019
    Hello Kees!

    08 Nov 19 00:17, you wrote to me:

    This doesent work:
    exec "/home/husky/bin/netsegments.sh" net33?.???

    This always works:
    exec "/home/husky/bin/mailin.sh" *.su? *.mo? *.tu? *.we? *.th?
    *.fr? *.sa? *.tic *.pkt

    Those files have wildcard that includes the full path
    */net33?.??? should work as well.

    So the facing asterisk in the working example has a double meaning:

    1) Every file name before the dot.
    2) Every path.

    It sounds a bit odd. :) Usually in *nix shells the wildcard limits it influence
    only on the file name and doesn't touch the path.

    Many thanks for the help! :)

    Ciao!
    Fabio

    --- GoldED+/LNX 1.1.5-b20180707
    * Origin: ]\/[imac Rebirth Boss Point (2:335/364.1)
  • From Kees van Eeten@2:280/5003.4 to Fabio Bizzi on Fri Nov 8 12:19:56 2019
    Hello Fabio!

    08 Nov 19 09:46, you wrote to me:

    08 Nov 19 00:17, you wrote to me:

    This doesent work:
    exec "/home/husky/bin/netsegments.sh" net33?.???

    This always works:
    exec "/home/husky/bin/mailin.sh" *.su? *.mo? *.tu? *.we? *.th?
    *.fr? *.sa? *.tic *.pkt

    Those files have wildcard that includes the full path
    */net33?.??? should work as well.

    So the facing asterisk in the working example has a double meaning:

    1) Every file name before the dot.
    2) Every path.

    It sounds a bit odd. :) Usually in *nix shells the wildcard limits it influence only on the file name and doesn't touch the path.

    It looked strange to me as well. But we are used to use the wildcard in
    a search though directories. In the case of binkd, binkd has the fqn as
    parameter and compares it with the wildcard mask.

    Kees

    --- GoldED+/LNX 1.1.5--b20180707
    * Origin: As for me, all I know is that, I know nothing. (2:280/5003.4)