[package] base-files: do not kill udhcpc on sysupgrade, it will tear down the interfa...
[openwrt/svn-archive/archive.git] / package / base-files / files / lib / upgrade / common.sh
index e0db37e7502db911b87b2f97703fc914c41c1a85..0870f7de5c8ec7d1137524aaea29d012fe1dcfe3 100644 (file)
@@ -80,14 +80,14 @@ run_ramfs() { # <command> [...]
 kill_remaining() { # [ <signal> ]
        local sig="${1:-TERM}"
        echo -n "Sending $sig to remaining processes ... "
-       top -bn1 | while read pid ppid user stat vsz pvsz pcpu cmd args; do
+       /bin/busybox top -bn1 2>/dev/null | while read pid ppid user stat vsz pvsz pcpu cmd args; do
                case "$pid" in
                        [0-9]*) : ;;
                        *) continue ;;
                esac
                case "$cmd" in
                        # Skip kernel threads and essential services
-                       \[*\]|*ash*|*init*|*watchdog*|*ssh*|*dropbear*|*telnet*|*login*|*ubusd*|*netifd*|*hostapd*|*wpa_supplicant*) : ;;
+                       \[*\]|*ash*|*init*|*watchdog*|*ssh*|*dropbear*|*telnet*|*login*|*ubusd*|*netifd*|*hostapd*|*wpa_supplicant*|*udhcpc*) : ;;
 
                        # Killable process
                        *)