From: jow Date: Tue, 3 May 2011 19:45:55 +0000 (+0000) Subject: [package] comgt: move ifup invocation back into background subshell to prevent hotplu... X-Git-Url: https://git.rohieb.name/openwrt.git/commitdiff_plain/a25fe1d267f0e4b7067af69877c1f69592321830 [package] comgt: move ifup invocation back into background subshell to prevent hotplug deadlocks git-svn-id: svn://svn.openwrt.org/openwrt/trunk@26810 3c298f89-4303-0410-b956-a3cf2f4a3e73 --- diff --git a/package/comgt/files/3g.usb b/package/comgt/files/3g.usb index ea2fba150..590cad417 100644 --- a/package/comgt/files/3g.usb +++ b/package/comgt/files/3g.usb @@ -21,12 +21,9 @@ find_3g_iface() { local dev config_get dev "$cfg" device - if [ "${dev##*/}" = "${tty##*/}" ]; then - [ -z "$(ls /var/lock | grep ${dev##*/})" ] && { - log "Starting interface $cfg for device ${dev##*/}" - sleep 1 - /sbin/ifup "$cfg" - } + if [ "${dev##*/}" = "${tty##*/}" ] && [ -z "$(ls /var/lock | grep ${dev##*/})" ]; then + log "Starting interface $cfg for device ${dev##*/}" + ( sleep 1; /sbin/ifup "$cfg" ) & fi } }