From 9c603c307cb77daa4a042bfc496c75b64b5e9b23 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Thu, 25 Jul 2013 12:27:43 -0400 Subject: [PATCH] Create NetworkManager-config-server package --- 00-server.conf | 20 ++++++++++++++++++++ NetworkManager.spec | 27 ++++++++++++++++++++++++++- 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 00-server.conf diff --git a/00-server.conf b/00-server.conf new file mode 100644 index 0000000..eede0c8 --- /dev/null +++ b/00-server.conf @@ -0,0 +1,20 @@ +# This configuration file, when placed into into +# /etc/NetworkManager/conf.d changes NetworkManager's behavior to +# what's expected on "traditional UNIX server" type deployments. +# +# See "man NetworkManager.conf" for more information about these +# and other keys. +# +# Do not edit this file; it will be overwritten on upgrades. If you +# want to override the values here, or set additional values, you can +# do so by adding another file (eg, "99-local.conf") to this directory +# and setting keys there. + +[main] +# Do not do automatic (DHCP/SLAAC) configuration on ethernet devices +# with no other matching connections. +no-auto-default=* + +# Ignore the carrier (cable plugged in) state when attempting to +# activate static-IP connections. +ignore-carrier=* diff --git a/NetworkManager.spec b/NetworkManager.spec index 460f8b8..fe2eb31 100644 --- a/NetworkManager.spec +++ b/NetworkManager.spec @@ -25,13 +25,14 @@ Name: NetworkManager Summary: Network connection manager and user applications Epoch: 1 Version: 0.9.9.0 -Release: 7%{snapshot}%{?dist} +Release: 8%{snapshot}%{?dist} Group: System Environment/Base License: GPLv2+ URL: http://www.gnome.org/projects/NetworkManager/ Source: %{name}-%{realversion}%{snapshot}.tar.bz2 Source1: NetworkManager.conf +Source2: 00-server.conf Patch1: explain-dns1-dns2.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) @@ -162,6 +163,20 @@ Requires: dbus-glib-devel >= %{dbus_glib_version} This package contains the header and pkg-config files for development applications using NetworkManager functionality from applications that use glib. +%package config-server +Summary: NetworkManager config file for "server-like" defaults +Group: System Environment/Base +Requires: %{name}%{?_isa} = %{epoch}:%{version}-%{release} + +%description config-server +This adds a NetworkManager configuration file to make it behave more +like the old "network" service. In particular, it stops NetworkManager +from automatically running DHCP on unconfigured ethernet devices, and +allows connections with static IP addresses to be brought up even on +ethernet devices with no carrier. + +This package is intended to be installed by default for server +deployments. %prep %setup -q -n NetworkManager-%{realversion} @@ -216,6 +231,9 @@ make install DESTDIR=$RPM_BUILD_ROOT %{__cp} %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/ +mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/conf.d +%{__cp} %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/conf.d + # create a VPN directory %{__mkdir_p} $RPM_BUILD_ROOT%{_sysconfdir}/NetworkManager/VPN @@ -374,7 +392,14 @@ exit 0 %dir %{_datadir}/gtk-doc/html/libnm-util %{_datadir}/gtk-doc/html/libnm-util/* +%files config-server +%defattr(-,root,root,0755) +%config %{_sysconfdir}/%{name}/conf.d/00-server.conf + %changelog +* Thu Jul 25 2013 Dan Winship - 0.9.9.0-8.git20130724 +- Create NetworkManager-config-server package + * Wed Jul 24 2013 Dan Williams - 0.9.9.0-7.git20130724 - Update to git snapshot