Changeset 3621 in MondoRescue for branches/3.3/mindi-busybox/examples/udhcp/simple.script
- Timestamp:
- Dec 20, 2016, 4:07:32 PM (7 years ago)
- Location:
- branches/3.3
- Files:
-
- 1 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/3.3/mindi-busybox/examples/udhcp/simple.script
r2725 r3621 30 30 for i in $router ; do 31 31 echo "Adding router $i" 32 route add default gw $i dev $interface metric $((metric++)) 32 route add default gw $i dev $interface metric $metric 33 : $(( metric += 1 )) 33 34 done 34 35 fi 35 36 36 37 echo "Recreating $RESOLV_CONF" 37 echo -n > $RESOLV_CONF-$$ 38 [ -n "$domain" ] && echo "search $domain" >> $RESOLV_CONF-$$ 38 # If the file is a symlink somewhere (like /etc/resolv.conf 39 # pointing to /run/resolv.conf), make sure things work. 40 realconf=$(readlink -f "$RESOLV_CONF" 2>/dev/null || echo "$RESOLV_CONF") 41 tmpfile="$realconf-$$" 42 > "$tmpfile" 43 [ -n "$domain" ] && echo "search $domain" >> "$tmpfile" 39 44 for i in $dns ; do 40 45 echo " Adding DNS server $i" 41 echo "nameserver $i" >> $RESOLV_CONF-$$46 echo "nameserver $i" >> "$tmpfile" 42 47 done 43 mv $RESOLV_CONF-$$ $RESOLV_CONF48 mv "$tmpfile" "$realconf" 44 49 ;; 45 50 esac
Note:
See TracChangeset
for help on using the changeset viewer.