/[gentoo-x86]/net-misc/dhcp/dhcp-4.2.2-r2.ebuild
Gentoo

Diff of /net-misc/dhcp/dhcp-4.2.2-r2.ebuild

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.4 Revision 1.5
1# Copyright 1999-2011 Gentoo Foundation 1# Copyright 1999-2011 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/Attic/dhcp-4.2.2-r2.ebuild,v 1.4 2011/09/22 17:32:35 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/Attic/dhcp-4.2.2-r2.ebuild,v 1.5 2011/09/22 19:38:41 vapier Exp $
4 4
5EAPI="2" 5EAPI="2"
6 6
7inherit eutils toolchain-funcs 7inherit eutils toolchain-funcs
8 8
196 newinitd "${FILESDIR}"/dhcpd.init3 dhcpd || die 196 newinitd "${FILESDIR}"/dhcpd.init3 dhcpd || die
197 newconfd "${FILESDIR}"/dhcpd.conf2 dhcpd || die 197 newconfd "${FILESDIR}"/dhcpd.conf2 dhcpd || die
198 newinitd "${FILESDIR}"/dhcrelay.init2 dhcrelay || die 198 newinitd "${FILESDIR}"/dhcrelay.init2 dhcrelay || die
199 newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay || die 199 newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay || die
200 fi 200 fi
201
202 # the default config files aren't terribly useful #384087
203 sed -i '/^[^#]/s:^:#:' "${D}"/etc/dhcp/*.conf || die
201} 204}
202 205
203pkg_preinst() { 206pkg_preinst() {
204 enewgroup dhcp 207 enewgroup dhcp
205 enewuser dhcp -1 -1 /var/lib/dhcp dhcp 208 enewuser dhcp -1 -1 /var/lib/dhcp dhcp
206 209
207 # Keep the user files over the sample ones 210 # Keep the user files over the sample ones. The
211 # hashing is to ignore the crappy defaults #384087.
208 local f 212 local f h
209 for f in dhclient dhcpd ; do 213 for f in dhclient:da7c8496a96452190aecf9afceef4510 dhcpd:10979e7b71134bd7f04d2a60bd58f070 ; do
214 h=${f#*:}
210 f="/etc/dhcp/${f}.conf" 215 f="/etc/dhcp/${f%:*}.conf"
211 if [ -e "${ROOT}"${f} ] ; then 216 if [ -e "${ROOT}"${f} ] ; then
217 case $(md5sum "${ROOT}"${f}) in
218 ${h}*) ;;
212 cp -p "${ROOT}"${f} "${D}"${f} 219 *) cp -p "${ROOT}"${f} "${D}"${f};;
220 esac
213 fi 221 fi
214 done 222 done
215} 223}
216 224
217pkg_postinst() { 225pkg_postinst() {

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

  ViewVC Help
Powered by ViewVC 1.1.20