Summary(pl): Serwer DHCP
Summary(pt_BR): Servidor DHCP (Protocolo de configuração dinâmica de hosts)
Name: dhcp
-Version: 3.0
-Release: 4
+Version: 3.0pl2
+Release: 1
Epoch: 2
Vendor: ISC
License: distributable
Source3: %{name}-relay.sysconfig
Source4: %{name}d.conf.sample
Source5: %{name}.sysconfig
+Patch0: %{name}-sh.patch
BuildRequires: groff
-Prereq: rc-scripts >= 0.2.0
-Prereq: /sbin/chkconfig
+PreReq: rc-scripts >= 0.2.0
+Requires(post,preun): /sbin/chkconfig
+Requires(post): fileutils
Provides: dhcpd
BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
Summary: DHCP Client
Summary(pl): Klient DHCP
Group: Networking/Daemons
+Requires(post): fileutils
Obsoletes: pump
%description client
Summary: DHCP Relay Agent
Summary(pl): Agent przekazywania informacji DHCP
Group: Networking/Daemons
-Prereq: rc-scripts >= 0.2.0
-Prereq: /sbin/chkconfig
+PreReq: rc-scripts >= 0.2.0
+Requires(post,preun): /sbin/chkconfig
+Requires(post): fileutils
%description relay
Dhcp relay is a relay agent for DHCP packets. It is used on a subnet
%prep
%setup -q
+%patch0 -p1
install %{SOURCE4} .
%build
install client/scripts/linux $RPM_BUILD_ROOT%{_sbindir}/dhclient-script
-gzip -9nf doc/* README RELNOTES
-
touch $RPM_BUILD_ROOT/var/lib/%{name}/{dhcpd,dhclient}.leases
%clean
echo "Run \"/etc/rc.d/init.d/dhcpd start\" to start dhcpd daemon."
fi
+%preun
+if [ "$1" = "0" ];then
+ if [ -f /var/lock/subsys/dhcpd ]; then
+ /etc/rc.d/init.d/dhcpd stop >&2
+ fi
+ /sbin/chkconfig --del dhcpd
+fi
+
+%post client
+if [ -d /var/lib/dhcp ]; then
+ install -d /var/lib/dhcp
+fi
+
%post relay
/sbin/chkconfig --add dhcp-relay
if [ -f /var/lock/subsys/dhcrelay ]; then
- mv /var/lock/subsys/dhcrelay /var/lock/subsys/dhcp-relay
+ mv -f /var/lock/subsys/dhcrelay /var/lock/subsys/dhcp-relay
fi
if [ -f /var/lock/subsys/dhcp-relay ]; then
/etc/rc.d/init.d/dhcp-relay restart >&2
echo "Run \"/etc/rc.d/init.d/dhcp-relay start\" to start dhcrelay daemon."
fi
-%post client
-if [ -d /var/lib/dhcp ]; then
- install -d /var/lib/dhcp
-fi
-
-%preun
-if [ "$1" = "0" ];then
- if [ -f /var/lock/subsys/dhcpd ]; then
- /etc/rc.d/init.d/dhcpd stop >&2
- fi
- /sbin/chkconfig --del dhcpd
-fi
-
%preun relay
if [ "$1" = "0" ];then
if [ -f /var/lock/subsys/dhcp-relay ]; then
%triggerpostun -- dhcp < 3.0
if [ `grep ddns-update-style /etc/dhcpd.conf` = "" ]; then
+ umask 027
echo "ddns-update-style none;" > /etc/dhcpd.conf.tmp
echo "" >> /etc/dhcpd.conf.tmp
cat /etc/dhcpd.conf >>/etc/dhcpd.conf.tmp
%files
%defattr(644,root,root,755)
-%doc doc/* README.gz RELNOTES.gz dhcpd.conf.sample
+%doc doc/* README RELNOTES dhcpd.conf.sample
%{_mandir}/man1/*
%{_mandir}/man5/dhcp*
%{_mandir}/man8/dhcp*