On 01/06/2014 05:17, =?UTF-8?q?Andr=C3=A9=20Valentin?= wrote:
> Signed-off-by: Daniel Golle <[email protected]>


nak, we need a jumpstart binary to do the wdt fd handover foo. can you
wait a few more days till i am done with my patches ?

        John


> --- package/base-files/files/lib/upgrade/common.sh | 32 
> ++++++++++++++++----------
> package/base-files/files/sbin/sysupgrade | 17 ++++++++++++++ 2
> files changed, 37 insertions(+), 12 deletions(-)
> 
> diff --git a/package/base-files/files/lib/upgrade/common.sh 
> b/package/base-files/files/lib/upgrade/common.sh index 
> 0207960..9549edb 100644 --- 
> a/package/base-files/files/lib/upgrade/common.sh +++ 
> b/package/base-files/files/lib/upgrade/common.sh @@ -111,18
> +111,26 @@ kill_remaining() { # [ <signal> ] # Skip kernel threads
> [ -n "$cmdline" ] || continue
> 
> -             case "$name" in -                       # Skip essential 
> services - 
> *procd*|*ash*|*init*|*watchdog*|*ssh*|*dropbear*|*telnet*|*login*|*hostapd*|*wpa_supplicant*|*nas*)
>
> 
: ;; - -                        # Killable process -                    *) -    
                        if [ $pid -ne $$ ] && [
> $ppid -ne $$ ]; then -                                        echo -n "$name 
> " -                                      kill -$sig $pid 
> 2>/dev/null -                         fi -                    ;; -            
> esac +          if [ $$ -eq 1 ]; then +                 # 
> Running as init process, kill everything except me +                  if [ 
> $pid 
> -ne $$ ]; then +                              echo -n "$name " +              
>                 kill -$sig $pid 
> 2>/dev/null +                 fi +            else +                  case 
> "$name" in +                               # Skip 
> essential services + 
> *procd*|*ash*|*init*|*watchdog*|*ssh*|*dropbear*|*telnet*|*login*|*hostapd*|*wpa_supplicant*|*nas*)
>
> 
: ;; + +                                # Killable process +                    
        *) +                                    if [ $pid -ne $$ ] &&
> [ $ppid -ne $$ ]; then +                                              echo -n 
> "$name " +                                              kill -$sig 
> $pid 2>/dev/null +                                    fi +                    
>         ;; +                    esac +          fi done echo "" } 
> diff --git a/package/base-files/files/sbin/sysupgrade 
> b/package/base-files/files/sbin/sysupgrade index cd224c6..01b170d 
> 100755 --- a/package/base-files/files/sbin/sysupgrade +++ 
> b/package/base-files/files/sbin/sysupgrade @@ -19,6 +19,7 @@
> export NEED_IMAGE= export HELP=0 export FORCE=0 export TEST=0
> +export ALL_ARGS="$*"
> 
> # parse options while [ -n "$1" ]; do @@ -206,6 +207,22 @@ if [ 
> $TEST -eq 1 ]; then exit 0 fi
> 
> +# should we inform procd to run this script +if [ $$ -ne 1 ]; then
> +     . /usr/share/libubox/jshn.sh +  json_init +     json_add_string pwd
> "$PWD" +      json_add_string command "/sbin/sysupgrade" + 
> json_add_array arguments +    while [ $# -gt 0 ]; do + json_add_string
> "" "$1" +             shift + done +  json_close_array +      ubus call 
> system exec
> $(json_dump) +        exit 0 +fi + run_hooks "" $sysupgrade_pre_upgrade
> 
> ubus call system upgrade
> 
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to