Commit 7a46ccff authored by Thomas Haller's avatar Thomas Haller

contrib/rpm: add "00-server-dhcp-client-id.conf"

While this is packaged in "NetworkManager-config-server.rpm"
sub-package, it's not in "00-server.conf" file. The reason
is that a convenient way to disable configuration from
"/usr/lib/NetworkManager/conf.d", is by putting a (possibly empty)
file into /etc directory with the same name. If the sub-package
only provides one large "00-server.conf" file, this is no longer
possible at a granular level.
parent b9eb264e
# default the DHCP client-id to MAC (instead of type 255, node-specific RFC 4361).
# But don't do so for dhclient DHCP plugin, as the default of dhclient may
# be specified via /etc/dhcp (and anyway defaults to "hardware" already).
[connection-00-server-dhcp-client-id]
match-device=except:dhcp-plugin:dhclient
ipv4.dhcp-client-id=mac
......@@ -117,8 +117,9 @@ URL: http://www.gnome.org/projects/NetworkManager/
Source: __SOURCE1__
Source1: NetworkManager.conf
Source2: 00-server.conf
Source3: 20-connectivity-fedora.conf
Source4: 20-connectivity-redhat.conf
Source3: 00-server-dhcp-client-id.conf
Source4: 20-connectivity-fedora.conf
Source5: 20-connectivity-redhat.conf
#Patch1: 0001-some.patch
......@@ -677,13 +678,14 @@ make install DESTDIR=%{buildroot}
cp %{SOURCE1} %{buildroot}%{_sysconfdir}/%{name}/
cp %{SOURCE2} %{buildroot}%{nmlibdir}/conf.d/
cp %{SOURCE3} %{buildroot}%{nmlibdir}/conf.d/
%if %{with connectivity_fedora}
cp %{SOURCE3} %{buildroot}%{nmlibdir}/conf.d/
cp %{SOURCE4} %{buildroot}%{nmlibdir}/conf.d/
%endif
%if %{with connectivity_redhat}
cp %{SOURCE4} %{buildroot}%{nmlibdir}/conf.d/
cp %{SOURCE5} %{buildroot}%{nmlibdir}/conf.d/
%endif
cp examples/dispatcher/10-ifcfg-rh-routes.sh %{buildroot}%{_sysconfdir}/%{name}/dispatcher.d/
......@@ -961,6 +963,7 @@ fi
%dir %{nmlibdir}
%dir %{nmlibdir}/conf.d
%{nmlibdir}/conf.d/00-server.conf
%{nmlibdir}/conf.d/00-server-dhcp-client-id.conf
%files dispatcher-routing-rules
......
......@@ -18,6 +18,7 @@
# SOURCE_FROM_GIT=|1|0
# SOURCE_NETWORKMANAGER_CONF=
# SOURCE_CONFIG_SERVER=
# SOURCE_CONFIG_SERVER_DHCP_CLIENT_ID=
# SOURCE_CONFIG_CONNECTIVITY_FEDORA=
# SOURCE_CONFIG_CONNECTIVITY_REDHAT=
......@@ -121,6 +122,7 @@ fi
SOURCE_NETWORKMANAGER_CONF="$(abs_path "$SOURCE_NETWORKMANAGER_CONF" "$SCRIPTDIR/NetworkManager.conf")" || die "invalid \$SOURCE_NETWORKMANAGER_CONF argument"
SOURCE_CONFIG_SERVER="$(abs_path "$SOURCE_CONFIG_SERVER" "$SCRIPTDIR/00-server.conf")" || die "invalid \$SOURCE_CONFIG_SERVER argument"
SOURCE_CONFIG_SERVER_DHCP_CLIENT_ID="$(abs_path "$SOURCE_CONFIG_SERVER_DHCP_CLIENT_ID" "$SCRIPTDIR/00-server-dhcp-client-id.conf")" || die "invalid \$SOURCE_CONFIG_SERVER_DHCP_CLIENT_ID argument"
SOURCE_CONFIG_CONNECTIVITY_FEDORA="$(abs_path "$SOURCE_CONFIG_CONNECTIVITY_FEDORA" "$SCRIPTDIR/20-connectivity-fedora.conf")" || die "invalid \$SOURCE_CONFIG_CONNECTIVITY_FEDORA argument"
SOURCE_CONFIG_CONNECTIVITY_REDHAT="$(abs_path "$SOURCE_CONFIG_CONNECTIVITY_REDHAT" "$SCRIPTDIR/20-connectivity-redhat.conf")" || die "invalid \$SOURCE_CONFIG_CONNECTIVITY_REDHAT argument"
......@@ -144,6 +146,7 @@ LOG "SOURCE=$SOURCE"
LOG "SOURCE_FROM_GIT=$SOURCE_FROM_GIT"
LOG "SOURCE_NETWORKMANAGER_CONF=$SOURCE_NETWORKMANAGER_CONF"
LOG "SOURCE_CONFIG_SERVER=$SOURCE_CONFIG_SERVER"
LOG "SOURCE_CONFIG_SERVER_DHCP_CLIENT_ID=$SOURCE_CONFIG_SERVER_DHCP_CLIENT_ID"
LOG "SOURCE_CONFIG_CONNECTIVITY_FEDORA=$SOURCE_CONFIG_CONNECTIVITY_FEDORA"
LOG "SOURCE_CONFIG_CONNECTIVITY_REDHAT=$SOURCE_CONFIG_CONNECTIVITY_REDHAT"
LOG "BUILDTYPE=$BUILDTYPE"
......@@ -164,6 +167,7 @@ if [[ "$(dirname "$SOURCE")" != "$TEMP/SOURCES" ]]; then
fi
cp "$SOURCE_NETWORKMANAGER_CONF" "$TEMP/SOURCES/NetworkManager.conf" || die "Could not copy source $SOURCE_NETWORKMANAGER_CONF to $TEMP/SOURCES"
cp "$SOURCE_CONFIG_SERVER" "$TEMP/SOURCES/00-server.conf" || die "Could not copy source $SOURCE_CONFIG_SERVER to $TEMP/SOURCES"
cp "$SOURCE_CONFIG_SERVER_DHCP_CLIENT_ID" "$TEMP/SOURCES/00-server-dhcp-client-id.conf" || die "Could not copy source $SOURCE_CONFIG_SERVER_DHCP_CLIENT_ID to $TEMP/SOURCES"
cp "$SOURCE_CONFIG_CONNECTIVITY_FEDORA" "$TEMP/SOURCES/20-connectivity-fedora.conf" || die "Could not copy source $SOURCE_CONFIG_CONNECTIVITY_FEDORA to $TEMP/SOURCES"
cp "$SOURCE_CONFIG_CONNECTIVITY_REDHAT" "$TEMP/SOURCES/20-connectivity-redhat.conf" || die "Could not copy source $SOURCE_CONFIG_CONNECTIVITY_REDHAT to $TEMP/SOURCES"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment