local defaultroute
config_get_bool defaultroute "$cfg" defaultroute 1
[ "$defaultroute" -eq 1 ] && \
local defaultroute
config_get_bool defaultroute "$cfg" defaultroute 1
[ "$defaultroute" -eq 1 ] && \
- defaultroute="defaultroute replacedefaultroute" || defaultroute=""
+ defaultroute="defaultroute replacedefaultroute" || defaultroute="nodefaultroute"
local interval="${keepalive##*[, ]}"
[ "$interval" != "$keepalive" ] || interval=5
local interval="${keepalive##*[, ]}"
[ "$interval" != "$keepalive" ] || interval=5
local peerdns
config_get_bool peerdns "$cfg" peerdns $peer_default
local peerdns
config_get_bool peerdns "$cfg" peerdns $peer_default
- echo -n "" > /tmp/resolv.conf.auto
+ if [ "$peerdns" -eq 1 ] || [ ! -e /tmp/resolv.conf.auto ]; then
+ echo -n "" > /tmp/resolv.conf.auto
+ fi
[ "$peerdns" -eq 1 ] && {
peerdns="usepeerdns"
[ "$peerdns" -eq 1 ] && {
peerdns="usepeerdns"