udhcpc: run dhcp hotplug events after dns has been set
authorFelix Fietkau <nbd@openwrt.org>
Sat, 4 Apr 2009 07:07:25 +0000 (07:07 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Sat, 4 Apr 2009 07:07:25 +0000 (07:07 +0000)
SVN-Revision: 15095

package/base-files/files/usr/share/udhcpc/default.script

index 198ef13c0fb6b1a13d238923c331c24e42cb2244..84c729783885785fb2ded256e91b0c6b7dda22ad 100755 (executable)
@@ -58,12 +58,6 @@ case "$1" in
                [ -n "$dns" ] && \
                        echo -n > "${RESOLV_CONF}.tmp"
                
-               if [ "$1" = "renew" ]; then
-                       hotplug_event update
-               else
-                       hotplug_event ifup
-               fi
-               
                [ -n "$dns" ] && {
                        [ -s "${RESOLV_CONF}.tmp" ] || {
                                for i in $dns ; do
@@ -76,7 +70,13 @@ case "$1" in
 
                        mv "${RESOLV_CONF}.tmp" "$RESOLV_CONF"
                }
-               
+
+               if [ "$1" = "renew" ]; then
+                       hotplug_event update
+               else
+                       hotplug_event ifup
+               fi
+
                # user rules
                [ -f /etc/udhcpc.user ] && . /etc/udhcpc.user
        ;;