v0.9.0
This commit is contained in:
12
dnsupdate
12
dnsupdate
@@ -352,7 +352,7 @@ function parse_ddns_config() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function get_all_ifaces() {
|
function get_all_ifaces() {
|
||||||
echo `ip addr show | sed -nr 's/([0-9]*: )(.*): .*/\2/p'`
|
cat /proc/net/dev | sed -nr 's/ *(.*): .*/\1/p'
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -412,6 +412,16 @@ function update_iface() {
|
|||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
public_ip=no
|
||||||
|
[[ ! $ip_address =~ ^192\.168|10\.|172\.1[6789]\.|172\.2[0-9]\.|172\.3[01]\. ]] && public_ip=yes
|
||||||
|
|
||||||
|
if [ $public_ip == "no" ]; then
|
||||||
|
ip_address=`dig @resolver4.opendns.com myip.opendns.com +short -4`
|
||||||
|
if ! [[ $ip_address =~ ^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
|
||||||
|
return -1;
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
parse_ddns_config "${ip_address}"
|
parse_ddns_config "${ip_address}"
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
Summary: Dynamic DNS for ppp and dhclient
|
Summary: Dynamic DNS for ppp and dhclient
|
||||||
Name: dnsupdate
|
Name: dnsupdate
|
||||||
Version: 0.8.0
|
Version: 0.9.0
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
|
|||||||
Reference in New Issue
Block a user