when starting sysupgrade on a router with
an interactive reverse SSH session provided
via dropbear/dbclient, the "dbclient" gets
killed during early run of the script, keeping
the box unreachable. maybe this is the same
user other tunnels too.

there are 3 possible ways i can imagine:

1)
warn the user when such a tunnel is detected

2)
keep the tunnel-proider in a whitelist, so
they dont get killed during sysupgrade

3)
nohup the script more early (and keep the process
running when the connection is lost)

internally we are using this for such things:

#!/bin/sh
nohup()
{
        # close stdin, and make any read attempt an error
        [ -t 0 ] && exec 0>/dev/null

        # redirect stdout to a file if it's a TTY
        [ -t 1 ] && {
                exec 1>nohup.out || exec 1>nohup.out
        }

        # redirect stderr to stdout if it's a TTY
        [ -t 2 ] && exec 2>&1

        # trap the HUP signal to ignore it
        trap : HUP
}

# detach script from shell
nohup

...further commands



has somebody and idea what is the "best"?

bye, bastian
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to