v0.8.0
- Config dir /etc/dnsupdate - Default config /etc/dnsupdate/dnsupdate.cfg - Per interface config eg /etc/dnsupdate/ppp0.iface
This commit is contained in:
20
dnsupdate
20
dnsupdate
@@ -384,15 +384,29 @@ function update_iface() {
|
|||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -f /etc/sysconfig/network ]; then
|
||||||
|
. /etc/sysconfig/network
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Load global config if exists
|
||||||
|
[ -f /etc/dnsupdate/dnsupdate.cfg ] && . /etc/dnsupdate/dnsupdate.cfg
|
||||||
|
|
||||||
|
# Load distro global config if exists
|
||||||
[ -f /etc/sysconfig/network ] && . /etc/sysconfig/network
|
[ -f /etc/sysconfig/network ] && . /etc/sysconfig/network
|
||||||
|
|
||||||
[ -f /etc/sysconfig/network ] && . /etc/sysconfig/network
|
if [ -f /etc/sysconfig/network-scripts/network-functions ]; then
|
||||||
|
. /etc/sysconfig/network-scripts/network-functions
|
||||||
# Load interface config
|
# Load interface config
|
||||||
cd /etc/sysconfig/network-scripts
|
|
||||||
CONFIG="${1}"
|
CONFIG="${1}"
|
||||||
need_config ${CONFIG}
|
need_config ${CONFIG}
|
||||||
source_config >/dev/null 2>&1
|
source_config >/dev/null 2>&1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Load dnsupdate interface specific config if exists
|
||||||
|
if [ -f /etc/dnsupdate/${1}.iface ]; then
|
||||||
|
[ "x${DDNS_DEBUG}x" != "xnox" ] && echo "Using config /etc/dnsupdate/${1}.iface"
|
||||||
|
. /etc/dnsupdate/${1}.iface
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "x${DDNS}x" == "xnox" ] ; then
|
if [ "x${DDNS}x" == "xnox" ] ; then
|
||||||
return 0
|
return 0
|
||||||
|
|||||||
5
dnsupdate.cfg
Normal file
5
dnsupdate.cfg
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
# Disable DDNS for all interfaces. You can enable it for specific interface.
|
||||||
|
DDNS=no
|
||||||
|
|
||||||
|
# Enable for debugging (default: no)
|
||||||
|
DDNS_DEBUG=no
|
||||||
@@ -1,13 +1,12 @@
|
|||||||
Summary: Dynamic DNS for ppp and dhclient
|
Summary: Dynamic DNS for ppp and dhclient
|
||||||
Name: dnsupdate
|
Name: dnsupdate
|
||||||
Version: 0.6.0
|
Version: 0.8.0
|
||||||
Release: 1%{?dist}
|
Release: 1%{?dist}
|
||||||
License: GPLv2+
|
License: GPLv2+
|
||||||
Group: System Environment/Daemons
|
Group: System Environment/Daemons
|
||||||
URL: http://netst.org/pub/fedora/st/
|
URL: http://netst.org/pub/fedora/st/
|
||||||
BuildArch: noarch
|
BuildArch: noarch
|
||||||
|
|
||||||
Requires: initscripts
|
|
||||||
Requires: ppp
|
Requires: ppp
|
||||||
Requires: bind-utils
|
Requires: bind-utils
|
||||||
|
|
||||||
@@ -16,6 +15,7 @@ Source1: dhclient-dnsupdate.sh
|
|||||||
Source2: ppp-dnsupdate.sh
|
Source2: ppp-dnsupdate.sh
|
||||||
Source3: dnsupdate.cron
|
Source3: dnsupdate.cron
|
||||||
Source4: nm-dnsupdate.sh
|
Source4: nm-dnsupdate.sh
|
||||||
|
Source5: dnsupdate.cfg
|
||||||
|
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
@@ -28,6 +28,7 @@ Dynamic DNS for ppp and dhclient.
|
|||||||
install -dm 755 $RPM_BUILD_ROOT%{_sysconfdir}
|
install -dm 755 $RPM_BUILD_ROOT%{_sysconfdir}
|
||||||
install -dm 755 $RPM_BUILD_ROOT%{_sysconfdir}/cron.d
|
install -dm 755 $RPM_BUILD_ROOT%{_sysconfdir}/cron.d
|
||||||
install -dm 755 $RPM_BUILD_ROOT%{_bindir}
|
install -dm 755 $RPM_BUILD_ROOT%{_bindir}
|
||||||
|
install -dm 755 $RPM_BUILD_ROOT%{_sysconfdir}/dnsupdate/
|
||||||
install -dm 755 $RPM_BUILD_ROOT%{_sysconfdir}/dhcp/
|
install -dm 755 $RPM_BUILD_ROOT%{_sysconfdir}/dhcp/
|
||||||
install -dm 755 $RPM_BUILD_ROOT%{_sysconfdir}/dhcp/dhclient.d
|
install -dm 755 $RPM_BUILD_ROOT%{_sysconfdir}/dhcp/dhclient.d
|
||||||
install -dm 755 $RPM_BUILD_ROOT%{_sysconfdir}/ppp
|
install -dm 755 $RPM_BUILD_ROOT%{_sysconfdir}/ppp
|
||||||
@@ -39,6 +40,7 @@ install -pm 755 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/dhcp/dhclient.d/dnsupda
|
|||||||
install -pm 755 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/ppp/ip-up.d/dnsupdate.sh
|
install -pm 755 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/ppp/ip-up.d/dnsupdate.sh
|
||||||
install -pm 644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/cron.d/dnsupdate
|
install -pm 644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/cron.d/dnsupdate
|
||||||
install -pm 644 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/NetworkManager/dispatcher.d
|
install -pm 644 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/NetworkManager/dispatcher.d
|
||||||
|
install -pm 644 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/dnsupdate/dnsupdate.cfg
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
%{__rm} -rf %{buildroot}
|
%{__rm} -rf %{buildroot}
|
||||||
@@ -52,6 +54,7 @@ install -pm 644 %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/NetworkManager/dispatch
|
|||||||
%{_sysconfdir}/dhcp/dhclient.d/dnsupdate.sh
|
%{_sysconfdir}/dhcp/dhclient.d/dnsupdate.sh
|
||||||
%{_sysconfdir}/ppp/ip-up.d/dnsupdate.sh
|
%{_sysconfdir}/ppp/ip-up.d/dnsupdate.sh
|
||||||
%{_sysconfdir}/cron.d/dnsupdate
|
%{_sysconfdir}/cron.d/dnsupdate
|
||||||
|
%config(noreplace) %attr(0644,root,root) %{_sysconfdir}/dnsupdate/dnsupdate.cfg
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Mon Jul 27 2015 Zoran Pericic <zpericic@netst.org> - 0.5.2-1
|
* Mon Jul 27 2015 Zoran Pericic <zpericic@netst.org> - 0.5.2-1
|
||||||
|
|||||||
Reference in New Issue
Block a user