cleanup only let the old dhcp lcient with patch stay
Package-Manager: portage-2.2.0_alpha166 RepoMan-Options: --force
This commit is contained in:
parent
9cfa54a805
commit
8cc6ec160b
@ -1,7 +1,25 @@
|
||||
# ChangeLog for net-misc/dhcp
|
||||
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
|
||||
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/ChangeLog,v 1.154 2009/05/29 23:30:28 vapier Exp $
|
||||
|
||||
16 Apr 2013; Mario Fetka <mario.fetka@gmail.com> -dhcp-3.1.2.ebuild,
|
||||
-dhcp-3.1.2_p1.ebuild, -dhcp-3.1.3.ebuild, -dhcp-4.0.1.ebuild,
|
||||
-dhcp-4.0.2.ebuild, -dhcp-4.1.0.ebuild, -dhcp-4.1.1.ebuild,
|
||||
-dhcp-4.1.1_p1.ebuild, -dhcp-4.1.2.ebuild, -dhcp-4.1.2_p1.ebuild,
|
||||
-dhcp-4.2.0.ebuild, -dhcp-4.2.0_p1.ebuild, -dhcp-4.2.0_p2.ebuild,
|
||||
-files/dhcp-4.0-dhclient-metric.patch, -files/dhcp-4.0-dhclient-ntp.patch,
|
||||
-files/dhcp-4.0-dhclient-resolvconf.patch,
|
||||
-files/dhcp-4.0-dhclient-script-correct-operators.patch,
|
||||
-files/dhcp-4.0-dhclient-stdin-conf.patch,
|
||||
-files/dhcp-4.0-linux-ipv6-header.patch, -files/dhcp-4.0-no_isc_blurb.patch,
|
||||
-files/dhcp-4.0-paranoia.patch, -files/dhcp-4.0.1-dhclient-stdin-conf.patch,
|
||||
-files/dhcp-4.0.1.ebuild.patch, -files/dhcp-4.0.2-no_isc_blurb-1.patch,
|
||||
-files/dhcp-4.1-dhclient-metric.patch,
|
||||
-files/dhcp-4.1-dhclient-resolvconf.patch, -files/dhcp-4.1-no_isc_blurb.patch,
|
||||
-files/dhcp-4.1.1-no_isc_blurb-1.patch, -files/dhcp-4.2-bpf-nofallback.patch,
|
||||
-files/dhcp-4.2-no_isc_blurb.patch:
|
||||
cleanup only let the old dhcp lcient with patch stay
|
||||
|
||||
30 Jan 2011; Mario Fetka <mario.fetka@gmail.com>
|
||||
+files/dhcp-3.1.3-dhclient-no-down.patch:
|
||||
update patches
|
||||
|
@ -1,82 +1,34 @@
|
||||
AUX dhcp-3.0-ddns-example.patch 401 RMD160 0188ae91fb58fc6f8c0d1b5bcbed58582dfed099 SHA1 c9e0f4c9ccbf1ff89076ff1bec37fb6d1276b7f0 SHA256 cf136ce92ea8f3337b9ded9c6f4f019db9782a68c63a3e8b712d26a04c2c9584
|
||||
AUX dhcp-3.0-fix-perms.patch 485 RMD160 3857270dffed5feee95609aeb37d0c9ef8844945 SHA1 1217265a8a7f1416b781e9f79e8dfb8304268e6c SHA256 a805a60b36e148886887aebb797e80f642386b3e55ef4a0b5132f96a2877e018
|
||||
AUX dhcp-3.0-paranoia.patch 5366 RMD160 7c64e3dac5b07ff3859fcaa7a8b0e52a0c50446c SHA1 a30103c138e480766f84644fffb1d0897709c27d SHA256 a8db9eb98397a9c1b3a0de07fc107c39dc4f6a4a331d404fc6fcc4a8dbc7aeae
|
||||
AUX dhcp-3.0.2-gmake.patch 1872 RMD160 d2d41c0a7e002103d68605d2492bfe716bb2889e SHA1 f60c89233f06ca8554cd5cc9ed0301b597a724f7 SHA256 b2bbfc1d1f5b4d03ff3f53b3974ec32731e5f626de8f8d127328591e4c721215
|
||||
AUX dhcp-3.0.3-dhclient-dbus.patch 2774 RMD160 250582d89894a58a297786c4a6884b54219c4b6f SHA1 74760ca00712ff529e6b97457408515098563f88 SHA256 d70292c5b61648ba5970ab436429ced33e807bd6f68ba06dcd2b9d4073b02ea4
|
||||
AUX dhcp-3.0.3-dhclient-hostname.patch 523 RMD160 38c20bcc417822ae858626eb5d0eaf7e669c1ca0 SHA1 5d2c3a1da74a1d151c9fbf08e01e4545e989078c SHA256 57c09edd2bf48cd65745e3b14499f7f3c26d529f60fd2ab122887ae968e26bbd
|
||||
AUX dhcp-3.0.3-dhclient-metric.patch 7270 RMD160 04187868f66e03a62dafd31b4cdcdd2029283ce5 SHA1 1d726d1526ae97adbdf1b259bb55e05145060375 SHA256 7e5ace014ed55d7d4e90a6cdac7dec4842ea9d178bb19bf6cdccf295eba9da7d
|
||||
AUX dhcp-3.0.3-dhclient-mtu.patch 6413 RMD160 2517c7fe58d7dca95bdbdc80e96b6260cc205e56 SHA1 da342800bafee86726570aa0a5e4e3c8bd5f1371 SHA256 0a4bff3c4c44252125f66a3a4423f677465592b84a8f7f500bad9ba4e3b5cb06
|
||||
AUX dhcp-3.0.3-dhclient-no-down.patch 2332 RMD160 26d0c88534b71070e81c86c12b76a2b4ec7c9c2c SHA1 b2a00d46754414e937dc6c3d63a28b63b3b57ac9 SHA256 a5a67de79f6435d9bc4eeea416aff7a904ab567e5e8d75ecf34495bc9f2c5a44
|
||||
AUX dhcp-3.0.3-dhclient-ntp.patch 5862 RMD160 73d001b7b2df36cf84aba9db76a1753c8d423a7d SHA1 cc3db6430f07f956c2ad25ed00e47d468eef2600 SHA256 80ab30eee75fb03c099416c25f031d03744011a582e8940c73077d5ee587c1ee
|
||||
AUX dhcp-3.0.3-dhclient-resolvconf.patch 6659 RMD160 27e6d97ca0ca52fc85abeb4f21f4cea526cbffcb SHA1 d4808b4ba195a2fe1232136c2e36fb534a4c07c3 SHA256 3e2ec3758f6a56658aa1ef9c8ab29f655716015f0c75eba022fa6e1a5e28b1ac
|
||||
AUX dhcp-3.0.3-dhclient-stdin-conf.patch 1948 RMD160 42f32a5bbfe2a937827c2972ef84cfa78c2c401c SHA1 ac7afd5ecbde5348e9acea532dab1e01e3a58e8b SHA256 e1bfd26b7da10acc4bd718e35aae4235308abcacde78dedf39533b11ab18b3ae
|
||||
AUX dhcp-3.0.3-libdst.patch 322 RMD160 5216c754a912cfcfc65683afcf44dbe1a7871212 SHA1 804bab67ae06269336c51183d5ff1e8ba45c20b5 SHA256 68e9a081739736980c0ad834dfa6197f940982f53d4d16054715c0346b5b9eca
|
||||
AUX dhcp-3.0.3-no_isc_blurb.patch 3002 RMD160 d70f89e1763bfeb23ce8f09399426983df01f7c8 SHA1 99a9fe69988226d29ccc6c2dc745ffab9b66817c SHA256 09c451cd9667fc8effcecd640f4cbe8629d41f6abacf9d1f2f923aab1f6e0bbb
|
||||
AUX dhcp-3.0.3-tr.patch 377 RMD160 fe81fefb55796b4e06fa73ec180026dceef5599d SHA1 947a4002e7e2b21cd80fe0a3d0f6f044d5c6faff SHA256 05f81ad7c0e8cd2d2f3e81c0cd1aecc0f2a2787672037eca87e66a814150f5c8
|
||||
AUX dhcp-3.0.3-x-option.patch 6478 RMD160 a0fa5b3c7caf2d303a76c3d6fc135783cfa2bbc6 SHA1 4c77474307f9e657e45618f93ba9120eafd83a9e SHA256 6628629a95ee7e711f9dbce6b7d527b15f98eaf7592a1d0855d7bf65961bc3f7
|
||||
AUX dhcp-3.0.4-dhclient-stdin-conf.patch 2176 RMD160 fae08899f6b57da3ec7ab0068e288bbdf2fbf2ae SHA1 c10c35dcf4a94f45f4bc98147a70e9dcf3f01dd5 SHA256 80141fe71e52774f1c7b1a02f2cbd49bc646f19753ceefc1c3605104df0cae5f
|
||||
AUX dhcp-3.0.5-bpf-nofallback.patch 1473 RMD160 1a5ece77cb481416935b0d2eea53e85dc4c4ee93 SHA1 d4cad638075a98606e07c633551c8a1d2f78f2e7 SHA256 b215c5ff4a282b475f28168250c05bbbc85e7c37e7af92616571d499b8c14da6
|
||||
AUX dhcp-3.1.0a1-dhclient-resolvconf.patch 10316 RMD160 183bedd1660bf5a5f9dc7d002199e76aec12341c SHA1 1e0332ea31cfdbe92f3053405587f08117de8f8b SHA256 112b2ed44aab92592eb3810c61ada7f30d9d01fe43b647667326972a37b412a1
|
||||
AUX dhcp-3.1.1-CVE-2009-0692.patch 494 RMD160 42d3490a34b9559a9c0f335c2a3b8c8a2105d55f SHA1 e1c6da730672194b1771f0729c7d9f08073dfa6e SHA256 df77ad202d11e21355ed92bf015286fcd2f28ae21302283ab570ea4d9b9632af
|
||||
AUX dhcp-3.1.2.ebuild.patch 3126 RMD160 b47a13a487647480ac0a6a7cb0856139dfa69560 SHA1 0c1e4cf6d41ba3a78d819c10eec919effcf3fc1e SHA256 29399b6e628e3af11e40c826e7ce12b12b8b20df2632628f97842cf8df800416
|
||||
AUX dhcp-3.1.2_p1-CVE-2009-1892.patch 427 RMD160 fe7daa6834faa0f6078ef125525f6a2db0c05f37 SHA1 eb6dcedecef536f743e97e7d0b5eea0a08f5e55a SHA256 55bb136138b76d6fa9c9165b348fb2c6975b935b3bba72ea551fc8bcae4fcc9b
|
||||
AUX dhcp-3.1.3-dhclient-no-down-1.patch 2948 RMD160 20b7b67b59e39bb691ae1ec9567ba49bbc465128 SHA1 00774bd3fa683c9af1ce0b3ff9bbc0015d2bb97f SHA256 d4e9d5fdf124aa8a359a22f2f244033710c4831176cf8904c32c10ff4b1f4f16
|
||||
AUX dhcp-3.1.3-dhclient-no-down.patch 2762 RMD160 bea58f58f745cbcee5d2d43f0dbabe54a1eaaafa SHA1 6ceb33afe42734b21b5ea91076b06c4fb4e9b81f SHA256 94c9dbe45063c6c600976ffab4c1fc9ac6f52f4e8077b5074f5142816ea626c4
|
||||
AUX dhcp-4.0-dhclient-metric.patch 8100 RMD160 cd599d5523be30809024b8e0f81cd84e4d932317 SHA1 ba9ff19cc5274b0e3e8408eba4725e0546413954 SHA256 a1c5589ac1c57ba7fe66336646f4286ebd7112f05abf5ae59b69ff26e7409afc
|
||||
AUX dhcp-4.0-dhclient-ntp.patch 7966 RMD160 d6dd1c3363f06712a82231eae1eb559f5a45bbb5 SHA1 3c1b373c6649c1ccb44f205fbee116c134514f4e SHA256 e93bda7f2baae9163f96ab0408bfbe885caa96a8698f9e566b8a9dc04de9359b
|
||||
AUX dhcp-4.0-dhclient-resolvconf.patch 14516 RMD160 0a53cbb795c4d4989f5632b6314b69be5bd94611 SHA1 e1db8ecca4de1c45fcec7e93fb13d186931d74f6 SHA256 1cdbb9ed297426b2d44063ffb8642c9c5cdf54dc2f9c3c8f59100f4ab2c40986
|
||||
AUX dhcp-4.0-dhclient-script-correct-operators.patch 1382 RMD160 3a37a68c5e9ab44b6f885e1e644f6138557ba45c SHA1 c5459430398b9c92ce9585672860abc6d247c451 SHA256 f5f1a75e9873b141d4b0a0f4fde911e6dfdddf13985e28e1789029ef7a072dfb
|
||||
AUX dhcp-4.0-dhclient-stdin-conf.patch 3009 RMD160 749a3768dd709b54ad0ce6fc53828e8e777f32c7 SHA1 49d2a5db802431d894c0c790addd7c6752be7070 SHA256 b3136285b6a9099ac1018d768b072c03bd136c1b5bffa58e48c5101dfe79cd83
|
||||
AUX dhcp-4.0-linux-ipv6-header.patch 817 RMD160 cd395ba33c6e729862af7a3c869d412e91ad5b41 SHA1 1e268892009a58caa8b6030be192a25583a96dd5 SHA256 dbb6f22c99dcf31fd91f89061398dea194476d37a1e328736adaff6fe2f00c6d
|
||||
AUX dhcp-4.0-no_isc_blurb.patch 2748 RMD160 f29d8705fab63320c18c6319dd5703a51acc1687 SHA1 d8af8f4567e4bdbfac5d8e5455dede87a188ad40 SHA256 603e9a6f28264e35513f40f987d10e4fdce6d5e4f8d48aa46f83b8687d57dff0
|
||||
AUX dhcp-4.0-paranoia.patch 4996 RMD160 2f8339e3d8af9164c91cc5a3bab7605ecd728295 SHA1 94db8a07b82b69d0a05645b08ef5d0ec0b99bd19 SHA256 14d328d400cdc1b4d7d6329d9c8e997b2c5e76e8f21330e267a75d6240799058
|
||||
AUX dhcp-4.0.1-dhclient-stdin-conf.patch 2965 RMD160 2c3dd3994f0a7f15f3fe51972dd04a2e6055613a SHA1 f4a9d51126ea489f75fcf29053ab432b68e5055d SHA256 0b25bc74ae258656dd1f0e6f4ffd6b4ef8b4ad56956624c0b6070941a180e57c
|
||||
AUX dhcp-4.0.1.ebuild.patch 2605 RMD160 1f1d6a2f087caee59535f0846ddaf3353641e0f0 SHA1 b2157ee25e9770ab61356afaa6939d0cafb7b109 SHA256 a99a2b9a9d17419626cf7442245c04252ed22c4f78d2202932a01b4abbeac251
|
||||
AUX dhcp-4.0.2-no_isc_blurb-1.patch 2926 RMD160 1834092946267c6e04f737406e5ece4441451e5a SHA1 6666ee124a06b24ae2d33b10620b3f8ac22dda1c SHA256 2baeecda2649004cead2eb5fc4c47a7cf49182d71528d4433c2912cc9486c13f
|
||||
AUX dhcp-4.1-dhclient-metric.patch 7493 RMD160 59131eb3645b80e666b0741324992f10545213e4 SHA1 ec7fedbc46efe882c172eb07613711cccc0bce73 SHA256 405027d4ed4aa4cf8df8e0972c543885f1a2c077483eac6771a58b84bee2a343
|
||||
AUX dhcp-4.1-dhclient-resolvconf.patch 14948 RMD160 fdff4c3055b543e1c315eb0a3add8d8a89b16f4b SHA1 a4f32e5025b6d995fb50f875346c05b436d744f1 SHA256 5dc9497bce03dd55285924b87ce73546cb3eee96e41de8005bff7dde26dc1d40
|
||||
AUX dhcp-4.1-no_isc_blurb.patch 2711 RMD160 6b6816756fc899a1bb108281faa4765fcf1d09f7 SHA1 5f010721ee2fd39232fc15ef18faccce6d15e3fe SHA256 c9a17ac6695fa29b016f9dc024b648641b3958ffb2c9740671a9f9c5e8b8e52e
|
||||
AUX dhcp-4.1.1-no_isc_blurb-1.patch 2871 RMD160 5669a81ac079670ea63d990890cf9d8f021277eb SHA1 7d4ccb64a59940cb9c80bc2d5c8c3bcc282e2c09 SHA256 e827a0b80dee1566edbe75ee8ff896b3efec089f6c518ef8949ada0247aa8957
|
||||
AUX dhcp-4.2-bpf-nofallback.patch 1553 RMD160 09e3eb3cf2947a60c331becf4f017b10e08436ec SHA1 89a9e09b52b1040df022fced61cbf06aa9b4fbed SHA256 cb667e46ca6700be3c925d5563cc040191208d9aae77402320ff17c018bb7cb0
|
||||
AUX dhcp-4.2-no_isc_blurb.patch 2849 RMD160 510b24023741b8d60f3911b37f9c226c2f0d7049 SHA1 e1d07279e668092d3bb27334c2b92b1c128bffdc SHA256 84a85c4e0f414803addd8a2cff4b5b67792e3f50635859a42bf72f5020f5855b
|
||||
AUX dhcpd.conf 1092 RMD160 936bb112c7cdf8e669b695599252d1f6626be2f3 SHA1 cbabbcea73a0cbc9692462683b983c96d6f18b0c SHA256 b86d27e0560689057b01a352474582fceb3a398eaf3b17f901378ec56284c4d5
|
||||
AUX dhcpd.init 1989 RMD160 7f6b6858020100e47efa5d6a0809b2959e551249 SHA1 2c611adc6425fd095740aa56d09d8aafb4fea58a SHA256 916bfeb81dcb3423fd4239270ac2dce2e6dc105b28a06e03b352f6bf6b30ed1e
|
||||
AUX dhcpd.init2 2421 RMD160 baa01ae97b227edba7653cd51735613be2dac652 SHA1 f2068ceb2d79d7992f46b31e6a6e3277a0167dce SHA256 fef93e5a7264780044a977ade27e9cc70de824063791bcd07d3db81c11c16df5
|
||||
AUX dhcrelay.conf 421 RMD160 456edbc9bcc8d3a44db5bb6dbf0c3003c3e7419c SHA1 78ecdb000382893fb49d0052ced063955b0ad9cf SHA256 409b895ed489e75c1a08f72961b45d641b93fd9357f528abc78b1fd036b7f730
|
||||
AUX dhcrelay.init 736 RMD160 04566b87bd6dbb8bb754b26409ca30b878ef3ca3 SHA1 72742b308314b2e1476b27e94212fbf4d179adc4 SHA256 cfdaff3a723be3935d06c14e171d4008f2ad3329bd05ac2e49c19bc0e14bc59c
|
||||
DIST dhcp-3.1-ESV.tar.gz 797454 RMD160 c6a8d943240dde72d47bb9bfbd740ff6e68ceee9 SHA1 e1cce81ead844fbdaf7ad99ba1146efa0b8b72c0 SHA256 e316b7dc34f05e38724273a473f823719281f229a71a80bc358f8e74687fd7d7
|
||||
DIST dhcp-3.1.2.tar.gz 799626 RMD160 026ac48b176ec273397fafa8a834a21fd6331681 SHA1 a60cccec2402a35025ddaafc8ac896595188560e SHA256 80daba1e4ac220a0945778aa3c1c9eb7860c4426645660bebb8ed35a3231a2fb
|
||||
DIST dhcp-3.1.2p1.tar.gz 792355 RMD160 53434f8404c69e8e113cad030ec975cf13b467cc SHA1 730214fa6e70d187f1492aa3d4f1c2868ffcc8de SHA256 e0cb405e0fef0ecebec7aaed294032a06178ff28be87498596e6069ccda4341e
|
||||
DIST dhcp-3.1.3.tar.gz 804097 RMD160 2337d1cc29e7be8ac973d8bfec633367dd37c12a SHA1 92fea5036c38a840f2f944b6cd1d90b18f950b7c SHA256 cb363247a897beaf5708c98d3a80dba8edd8f639d6bd1f4ada6c5a64ba51e2d4
|
||||
DIST dhcp-4.0.1.tar.gz 1050570 RMD160 a9764a76d105778362fe4b58e77783331ee3448a SHA1 7d813740ab4a64e474f1c01b1395617987532ed1 SHA256 965d09a7759250eff7d6d06d37425ea085c14edb5b405f8357ef5ec72ded28ef
|
||||
DIST dhcp-4.0.2.tar.gz 1043137 RMD160 7c80370b433de30f89c8e685a939a89e5390ead7 SHA1 585a1b78d3bff6a7e421e7f63343aaee269be0df SHA256 43874113815028b08ac76f14b6b9590b2649663bcbb47a70af9a752fd5274461
|
||||
DIST dhcp-4.1.0.tar.gz 1086815 RMD160 bf96fa9d135a65b4d9b27f8caf4f3744f0636c80 SHA1 46e161892140a3b60cd56e62b442f48f51bc605f SHA256 688741e970410efdb177513550f8cd1ee52032eb109313ab316a852f40310914
|
||||
DIST dhcp-4.1.1-P1.tar.gz 1085414 RMD160 d963e87a24e4dd8f98002577446169773a0b8422 SHA1 e9e756df09502f6666cd79bdf0ab3af0f92b41b0 SHA256 2f640350cbb1966ec3090198c3f128d649a3655f747f96ce910a477fe63263da
|
||||
DIST dhcp-4.1.1.tar.gz 1084368 RMD160 8b5b7223979c2bf279fe8042ad97680f1d2205fe SHA1 b23a28d481a84248f8170b4c6c1166a86c04b2a6 SHA256 37058685bffbfeb793cfb0867f0b1911f8d238ea69fbaa6cbb165455ab803618
|
||||
DIST dhcp-4.1.2-P1.tar.gz 1092661 RMD160 f57c3a4b0cbbbd8fdc0543d12266fff63f175ceb SHA1 d682f8d1d2905432550864c3cd79eeb29607d6b5 SHA256 bf6e13e1aa90c4d15adb6fdf0071b3da8988c3322c1b5629075181eea9d78dcd
|
||||
DIST dhcp-4.1.2.tar.gz 1092220 RMD160 2616df849354a63ffa269d1e12714f1ee55c3b62 SHA1 99054d38b957a917c9bfb5c135c1d3fe38713093 SHA256 82e0f6627a91990870fddac1a1e8e1e076ddf20981cd03d396199f182a714e29
|
||||
DIST dhcp-4.2.0-P1.tar.gz 8582012 RMD160 d57b68957c200a59052adf4a9706ede9aad97527 SHA1 e4c089d976d73c1e5d15bb6c5aedab1124d61de7 SHA256 5f9c9ea376d3aedbe4c0161176abfe6dbfa649b7f7b2010b8db53f4ff49cc535
|
||||
DIST dhcp-4.2.0-P2.tar.gz 8579215 RMD160 8ac1f44b193d9c0ffc7fb959cc0e47c084ed7581 SHA1 95de255c22643e67d8aca9aa712fb6113b413ef4 SHA256 11f3a10c2476133739efacccc26e0fc67c1902354493a917c10fe3e4abaa7fba
|
||||
DIST dhcp-4.2.0.tar.gz 8581458 RMD160 80665da45cecb7c87ff06fd3b7c806b75f8c1344 SHA1 3cd76d9225d9d8405b02f13660762438d4ad3160 SHA256 6260d43423e4c406ba63cd7199502a395e952b13c80a955026c4b82a4e9d4943
|
||||
DIST ldap-for-dhcp-3.1.2-2.tar.gz 39752 RMD160 96d2f469b1349485c0202012697222911b81abe8 SHA1 023d12eeb148ad493e252edbfd112d19c9d0cecd SHA256 afd30a30d72a17a4d8ae1a27c247711f03b30b5e270bdcf9f521695b55b28db7
|
||||
DIST ldap-for-dhcp-3.1.3-1.tar.gz 41029 RMD160 8b3793f6f6db956fd9c2d6b1ea94e8bd040d188b SHA1 e8053dac00e04fa27ebe90260e78a7d37da21ec7 SHA256 4df0daf50ddc31eb3cfd7c31226ac3d766fb37884f80fc6b96f3c3ee4a94baab
|
||||
DIST ldap-for-dhcp-4.0.1-3.tar.gz 39117 RMD160 977ec08ec0213e1a53d0dd5b3b08a234172dbd22 SHA1 8bc692bb2017c1b5ff35d73c10e5a2e4ed44e559 SHA256 161f5cd479ba0789d139ef59d101244fa7c880c3d1c13cbbbbae978004a30a18
|
||||
DIST ldap-for-dhcp-4.1.0-5.tar.gz 39281 RMD160 bfcfd98542b4e3616f1008fda30495e853e91c09 SHA1 bc2dc8c0215d3abac346c05db0b6327d34d2132c SHA256 e99977de60b5fc03ef30b035ab15c90896296909cde1c76886c1361a714b90cc
|
||||
DIST ldap-for-dhcp-4.1.1-1.tar.gz 38986 RMD160 4a48d1303f8d8ca864a7211cb89dab74cbb04943 SHA1 274455b3a0e2638a6a7d69054d0af683d4c51061 SHA256 69e5b40703cef761d5483a8125dd59f40ffaee6aa8c272ba306905987f22fa83
|
||||
DIST ldap-for-dhcp-4.1.1-2.tar.gz 39004 RMD160 47b076c47bb586428cff13ce1a48dbd123b8e1e9 SHA1 69561d798ab2869a2842d226dfad141eb1b8d3b8 SHA256 566b7be2ebefdc583d0bf0095c804ba69807b67e5cc29a2b64b1b39202b37d0d
|
||||
EBUILD dhcp-3.1.2.ebuild 8478 RMD160 5739bc5f0d1d5cf5baad7bc2419af864988fcf42 SHA1 27baeee0206bc5e49a8d8acdb5e59646e6819abd SHA256 a352c8a9a5d96e5866e0f79581269af326e2a39d2a634c2f26fa4b788b29d92c
|
||||
EBUILD dhcp-3.1.2_p1.ebuild 8501 RMD160 e8f656c31a4ee5976da0e8b41ce85fdf3fbdcfc7 SHA1 e6b357ad4cb470c994ce71029bf95206fbf26e6e SHA256 13cf2abfdfcb3d891d350fbe01551963b3bbfc7f028595637f0f56bc0b3bae61
|
||||
EBUILD dhcp-3.1.3.ebuild 8196 RMD160 4edccb14aa7bcd1536f9bda343c24e10bcdd9a2f SHA1 ea93baf765ee56c77a398e4b868d7ed42f38819b SHA256 09d92a5ff9e670cd7f2ec8f00e7c5b43b6f94056f862ece2fbeb0cb322e1f2b6
|
||||
EBUILD dhcp-3.1.4e.ebuild 8223 RMD160 2c81f63c2a7fcc2c910709f8e858ad5f5d88562f SHA1 6684237719123145fa22c522bdb312c6b410c912 SHA256 b7054ee38652112faaffbc6391116de080d2aff927bbc635521fe8d6cbe570d9
|
||||
EBUILD dhcp-4.0.1.ebuild 7529 RMD160 6f1a9652627d16cf31f5a709850370de07297f93 SHA1 f99f6dbabeb4e7d5de2b9182446749043533e2e9 SHA256 01741238ee7d80d8d9fc2b2309f7a7fc379c8c40a83d54a9837b7c68a5160cc7
|
||||
EBUILD dhcp-4.0.2.ebuild 7071 RMD160 e458c6fafeeede68f7897181b2152489844fe843 SHA1 e561df613119c13fe3cae384b198b48228bfd8ed SHA256 ae08f2c2b91e998860b9585ceefb1f6260b86c0b71415a110d4f478a164ebf1f
|
||||
EBUILD dhcp-4.1.0.ebuild 7488 RMD160 951457f2b70458c38d82c5013e8e6287ab0353fb SHA1 d96c3ebd090b6def031e79d8902b2c87e303167a SHA256 ec25fa7569f92d9dac230e85702427d37d51981d50033667ce36ccfe7be0620a
|
||||
EBUILD dhcp-4.1.1.ebuild 7028 RMD160 e749ceb20ce4ec53319a5c0b2eb51fbd1a9f6da0 SHA1 f24922e252a1a9dad9972cbabd6aaf88308f4797 SHA256 d4ca9c44e344189290decb3da8375a834b496730f06d59545af19f95bd102e03
|
||||
EBUILD dhcp-4.1.1_p1.ebuild 6969 RMD160 231066d0ebb33ea454f0874566234080073d5f72 SHA1 b90be96d283dbd983ea67efabbe545380a03fb7a SHA256 f115cdfdf85996d94cab0b30343a474f8a74fc3c31607798e246e42dc249cce6
|
||||
EBUILD dhcp-4.1.2.ebuild 6856 RMD160 ec3861378f32cca77c68fbbb0886a98129a49399 SHA1 3f0054016582149be39a5f5f2fbaffd96d420a3b SHA256 13a95298e1e54d623ff5769228a94fcc533bc59c961e3fae77c318d2978da006
|
||||
EBUILD dhcp-4.1.2_p1.ebuild 6856 RMD160 a69e9229c8e9b2b1d9e5bb4401216de67e6d39a4 SHA1 2706d24f35dccc7a8f2ea6e0fd96b68521c42081 SHA256 fc4ab4ce8df7bc5ed918f3309dd61c48205a6208665d732878a52de101fb0606
|
||||
EBUILD dhcp-4.2.0.ebuild 6446 RMD160 ef04d42aae30a41e75b020cce55c29ba7f9308b6 SHA1 d8fda6cb3428cec028d1d1b1f879cbbf97440d88 SHA256 d49b721691f80d55616404d2f47b069a5af04b86664d39a16dda983a03f273e9
|
||||
EBUILD dhcp-4.2.0_p1.ebuild 6470 RMD160 3cb152aa2e9b374a3785bb662689e2c29b090af6 SHA1 47df78414167bd0a19c8dd8f18a7758ce631fdd1 SHA256 3d5faddc64f8e088c65ec82f5453f0ef18c2f5c2ee254098a726672f215fecda
|
||||
EBUILD dhcp-4.2.0_p2.ebuild 6371 RMD160 a44086bff7fade134bbf7c6f6b43e28310cab5fd SHA1 8aa8e569af3db13670b56d5a735a44dc0bad9e1f SHA256 48ae1f64d1580aac9c86f36ae45534f7e6c3f4b55befda27a4e846496666cdf9
|
||||
MISC ChangeLog 31078 RMD160 fd8cbb7185f5a96edb704e50f67300b89bf3fe0f SHA1 e3096af87cdb5b5e81e6273d43b1f0967a0c363d SHA256 cfd4f287073a41cc0087dd401fbd401f7c5aa5ba8b1f5b887842ceff6946a4e9
|
||||
MISC metadata.xml 358 RMD160 97ecd4b6ee0a24352a71a66d5ad4fd82481156b4 SHA1 d80da2cf7c6892cdad6b681fda29e46472d68871 SHA256 8665f24cdfcc09576b595f8bd257333ff5f9ea7ee0ca2925ba6fb74d90e12415
|
||||
AUX dhcp-3.0-ddns-example.patch 401 SHA256 cf136ce92ea8f3337b9ded9c6f4f019db9782a68c63a3e8b712d26a04c2c9584 SHA512 abd52d8c0923b32536eba13b196beba5cae4aba26b7169f471e96a9cd6e8077a53d211d62730db2915b7a881a045d555d8c3533fa3fd1696794197b8171c4857 WHIRLPOOL a22980f3bb08b94a49e067dd6befea4f97459a70658cfec842587af349ae53c005b5b54c3201c3e9dd1e3acea17ba14d59ead1817d48b9321c2d8bf47329b948
|
||||
AUX dhcp-3.0-fix-perms.patch 485 SHA256 a805a60b36e148886887aebb797e80f642386b3e55ef4a0b5132f96a2877e018 SHA512 6d3ae697faf576bac801d9c302187ed7c8691eb991e0f9866e528ef7fb72592ba239b7519124919c44e4fff6108e4f13d83c1c0bb35d022f7a702b1fb06a6333 WHIRLPOOL af9a21870c2b1785573ea29f82dcb6b5629b9d6f0de94fa49e60576645d721debc8c6d01a29c4a6daeff91abe9674c5d07a8bca8b960893b51f85a0a43bfd56e
|
||||
AUX dhcp-3.0-paranoia.patch 5366 SHA256 a8db9eb98397a9c1b3a0de07fc107c39dc4f6a4a331d404fc6fcc4a8dbc7aeae SHA512 7583ce88621c5f3c5f150129a4a3c82a20a237adeb689fb7067f23fc8a78ab89305741605284d9de0d5fb91d329c5fbd08361405845d5b34adf41a9b26261690 WHIRLPOOL 24afb961c2500bccdda097faac12a24215e0f0473310195552f69a789875f3ac61cbb904b69caa2109f2cd76a77ca96840baf375cc260db65b0e15dbedeaee9e
|
||||
AUX dhcp-3.0.2-gmake.patch 1872 SHA256 b2bbfc1d1f5b4d03ff3f53b3974ec32731e5f626de8f8d127328591e4c721215 SHA512 4685947682df80c32d887a54206327012b14e23901b40d3677330ebd6a5a089f1aeb45ffca7ff5dbb0d980c077ea6a5c0552d67f43ec1e86f9b96195d3b17bd1 WHIRLPOOL fc28a5c1d510e7a825424a03c562a32089bf00efde05d03fb79244625e7605419226a77644d761691b54b51fa13e67cbf08f97d4ed4bffa225ed6bdc5ee3c7aa
|
||||
AUX dhcp-3.0.3-dhclient-dbus.patch 2774 SHA256 d70292c5b61648ba5970ab436429ced33e807bd6f68ba06dcd2b9d4073b02ea4 SHA512 fe7d8423df7560874eef750fd55634bc291da72f969105d3b6413cc710b4ae474a24fc59c8634cf07ae6689b0a6d420007a104335f59b124da3f79ccbc5cecd4 WHIRLPOOL 9cedbf9ee520cbe1b7d858e352e718e1bad205d363d5e4df686eed0cb08863dc3a3db842177725317d3c84bd42e6c5cbfb6ae91caa6bbb2b7d07ea2c91c6a0a4
|
||||
AUX dhcp-3.0.3-dhclient-hostname.patch 523 SHA256 57c09edd2bf48cd65745e3b14499f7f3c26d529f60fd2ab122887ae968e26bbd SHA512 0a0113951cbf8269928705edc568b0e424ab5d2f3c55950cba6c8dead43a641a85664f10eb748e7e8eb5644023b53f2392811d25abc5ee7d09bec1842e758ff0 WHIRLPOOL fc6a77d3d6fec5d54a43f41f38b1790ac42364b69fc85851e7d450aa9210bbc41c3bd61f13815233a30c8b85868111edccc4554ecdb5d65bb4cff86f04641257
|
||||
AUX dhcp-3.0.3-dhclient-metric.patch 7270 SHA256 7e5ace014ed55d7d4e90a6cdac7dec4842ea9d178bb19bf6cdccf295eba9da7d SHA512 0cec4360744f0fb89c4b56e81e7b78b2bdffd731e74e9a4c7061102480096420bbe038a4d1553ae05e0d57bab86a00d8c51fecdb79d8c77b6e1cbad6ae0ad61a WHIRLPOOL 5c68d1d9e770e318ca7ca0e40d789c32dd7f1d56b8324ed711fb1267ad39eedfcf67704153cde7b137a09cdddfe332a0c7f8e7837f06876b0150621f82881566
|
||||
AUX dhcp-3.0.3-dhclient-mtu.patch 6413 SHA256 0a4bff3c4c44252125f66a3a4423f677465592b84a8f7f500bad9ba4e3b5cb06 SHA512 109720c1efe63695e59d1ce37cb40de7d07aa08ed66bb6213cc47d104d5d445c73217e8803c0c66bb1470ef5c8b56e0f610409695d3feae2fcb15c08f24e5ac7 WHIRLPOOL 2f436fdb686f6fe35f4b7e5e518c25d2c9a001eb240ec2951535ecea399ba53bd57d244dbd7b96ab14a1d0d594139e8365f505e5d0b9cfbd92ced15055894b46
|
||||
AUX dhcp-3.0.3-dhclient-no-down.patch 2332 SHA256 a5a67de79f6435d9bc4eeea416aff7a904ab567e5e8d75ecf34495bc9f2c5a44 SHA512 12440298f27980256bd797c133f2fe14fb55485c8631176c055122c2d874bbbed84dca75d5a2d2abbd37ca5ed0d3ab94c3383a5de9a35f1ac69c2c6a215ecf7d WHIRLPOOL 0993456be9b082368e7fdc20acf37af168ff55f4fbde381c6cc8d3940c4cd00b4c683c954ff1ce62c5ebc8d4c48d228a2eb77ee114eb2efdb726bcea9833f48d
|
||||
AUX dhcp-3.0.3-dhclient-ntp.patch 5862 SHA256 80ab30eee75fb03c099416c25f031d03744011a582e8940c73077d5ee587c1ee SHA512 f9997b3aa6a6b8355dab62c177c1b407158ad28a844a45b9e49d3c8d9579029ff5c0f43bf48d2cbe26ea831b4a89c1206793f07a44b33ab823cd46f58048af2c WHIRLPOOL c640e7021e362b5f3a091201b1c08f16387bd2322023d8f8ad1ca5ec522f61a107a9d838682157a7c45415aa06968d835f4dd743a09e85ee1335df18c9942fa8
|
||||
AUX dhcp-3.0.3-dhclient-resolvconf.patch 6659 SHA256 3e2ec3758f6a56658aa1ef9c8ab29f655716015f0c75eba022fa6e1a5e28b1ac SHA512 f64b755f15d0648b36a2a6cf2bb67c49932f58bc8bd5cf46f9f1c2a06d6af32ef4719c5ee82d0f28f8c3c6d3533dfe846d1889a54d07c0be4b97881f4dfeb302 WHIRLPOOL f88e59a806bf5d6741cf665477548641359478448d199962cac54e67a543959dae6f8870438004deae45c34103b0fe0b1a64792c1ca98593d6b8fb513d6aaa86
|
||||
AUX dhcp-3.0.3-dhclient-stdin-conf.patch 1948 SHA256 e1bfd26b7da10acc4bd718e35aae4235308abcacde78dedf39533b11ab18b3ae SHA512 e13e8fed3f3235af32f7e2f99d93aac447365481b974ff311bc82e7fc6172fd8eb61f404680683b6224887c49a0b3ce452deabc7244224ff7f2beec055c4cb94 WHIRLPOOL 8cf076aeb96a5aacad942e67cab9b66ea9be2a86d4b4003ae0f63a5bf456cf24309f2180c8ebc8b0647644b25c7c36b1e9e74f0ca1d0651f9826ddf48cd150f6
|
||||
AUX dhcp-3.0.3-libdst.patch 322 SHA256 68e9a081739736980c0ad834dfa6197f940982f53d4d16054715c0346b5b9eca SHA512 b68479d0be9e10f12728c3813819f4eec47fb08f4df4df13bc260ddcf8084fc47e1f3bf5018918739bc08ed773409e14851be4867cb7214781e4586fe53038de WHIRLPOOL 89158dcc8bd3f34a0a3a354678bb53ef8111768e2e3d16a173a5de820832d131c49e42c73c5cda004f785603fcb151f1015105df139cebb52f7da499ab93f42b
|
||||
AUX dhcp-3.0.3-no_isc_blurb.patch 3002 SHA256 09c451cd9667fc8effcecd640f4cbe8629d41f6abacf9d1f2f923aab1f6e0bbb SHA512 34a075ce95c620dbf0e72d7a317ea203856924ae112f86ee765fa10c315415869d33b9e60d74c2af56d65aa750c5c9b551b8d2529f4aec2399dfed9b09d9d248 WHIRLPOOL 14497dc268adb2087c9a4798fdf2c3107d9dd2932138bb7f45f2078c2f24bf9f1460eb653eec268bac98836de971acfd564485d281c43d9b73463dc8eed88500
|
||||
AUX dhcp-3.0.3-tr.patch 377 SHA256 05f81ad7c0e8cd2d2f3e81c0cd1aecc0f2a2787672037eca87e66a814150f5c8 SHA512 adbe982287443ada7fb7445c64fcd2e878ee796d83a8a855c3d5418556e36ce40cb4ac6de90eabf0410aa40830ba1cb480c6b55888e975a86b73ac54f3a41f9e WHIRLPOOL 097e0799962cb812910f06be287a5dd2ae285abd79569cb88375253783de6ab3c18c009b26e24a1d6328497d136d74fc643dcfaa0958d2928a71d433829eaabe
|
||||
AUX dhcp-3.0.3-x-option.patch 6478 SHA256 6628629a95ee7e711f9dbce6b7d527b15f98eaf7592a1d0855d7bf65961bc3f7 SHA512 761650e2895e847af789edadb042ec441bf7ca82f6a10fb146a3f654b3bbd26d76756018811fdb6fd091ccaf5b8467f5bd0a63f1984d75a4b6e7b608cd59075f WHIRLPOOL 3cc04f3f064fa18fcbb099bc8c44de5399a8df8748ebfd0ff40da7b1605dfc8be9ddc19b2c42c603b25b2087edfabc75c2a46c40c07b62d33ecc0046d045ed0a
|
||||
AUX dhcp-3.0.4-dhclient-stdin-conf.patch 2176 SHA256 80141fe71e52774f1c7b1a02f2cbd49bc646f19753ceefc1c3605104df0cae5f SHA512 58ec458116015860b8bec03ad8467216004bed530b73dfa13c8b1a136c9689da9e7d7d2f1f6899f8417daece5cd88df5ce5d876fc87353862e90a9d8bbb916c3 WHIRLPOOL 7bfac7fa5d9c35784fa35e60b86d8e989c3986415fd2fece85a85daad916365d7ff95179eec7ae84724357b3f73b675b821680adccf04fcf66de6b385ee25d3c
|
||||
AUX dhcp-3.0.5-bpf-nofallback.patch 1473 SHA256 b215c5ff4a282b475f28168250c05bbbc85e7c37e7af92616571d499b8c14da6 SHA512 68916ee1f82b4b37f3badbb60ac797ef529624f85b15d81f473a658267d066bfb0d2e275c69f5cba0b85f92d5b1621e235695fc429c726cc0d59b84d6839c4e3 WHIRLPOOL 304785e63a7c8f76ba96e9a4783ee3b1f25924dadcfabcecbeb16fea9ec7fa6b0c60703deaf68858f9a2debda9bb212a45cf3d0f9c9bad07760b1d29acb61244
|
||||
AUX dhcp-3.1.0a1-dhclient-resolvconf.patch 10316 SHA256 112b2ed44aab92592eb3810c61ada7f30d9d01fe43b647667326972a37b412a1 SHA512 595b01fe072577a889fd344cd3296b3367ddb6154b0a9e6d3251f57969f1762f344e3ce002628d43ed213180aaeff7280fda5b3002b873f6a6f306dd6ff6b081 WHIRLPOOL af217cf6c1e7f4bdbdd9735f1807319ba2185c75cce62164cf8084cbccbb82bda6fcda0d3cd178ba328bba492ba582f96e33bf5e4512c375dc3ac5131f5a65e6
|
||||
AUX dhcp-3.1.1-CVE-2009-0692.patch 494 SHA256 df77ad202d11e21355ed92bf015286fcd2f28ae21302283ab570ea4d9b9632af SHA512 556eae3a8a24e545d4225d6f3da0377d726b92cdf52e4b1444674d5ac1f14fe23cbe7aa5d956bbcc7b4e2ea6dd1387f0911d5e74c3ff4297a790dd8b6fe626e4 WHIRLPOOL cfd6a7b28ae53adb00b183a0c6bd3202c318fc0fb3996abe4e813a7929570bd4f99e52df28c6a31eaed0c5fd48d9e9c002b98dc55609677c3eda1585b9cd510b
|
||||
AUX dhcp-3.1.2.ebuild.patch 3126 SHA256 29399b6e628e3af11e40c826e7ce12b12b8b20df2632628f97842cf8df800416 SHA512 b0c9e58115b6829d0e1fbcaeb0c5dba03bbb728b5d5dd539a63f2b3a3cf0a690b5dd629a614025301eb249aecc24c0271958026c30414cfd42c4174606a3bb76 WHIRLPOOL 9e08e3e4b04cde485967b2ff08e54949f445c7835585ac138def05ec9bde48e6bee31aaea01fbf74e5655a7d91d67d49c8ad143760a1298c70502e3dc151c577
|
||||
AUX dhcp-3.1.2_p1-CVE-2009-1892.patch 427 SHA256 55bb136138b76d6fa9c9165b348fb2c6975b935b3bba72ea551fc8bcae4fcc9b SHA512 4d0fdc61126e16e70edd6a7b4c8bac98a8e19b70a79fcf8f48b50b3f1a137b08ab8f105203a0ff514d81da7c9ef979f248e11e3eaf82305c91619348e3457c3f WHIRLPOOL 8a46f7c576f3ca07c4f3476e18b4339b6643d8ea294a15daa84e4c52cd12a8613a08c7055413f79e475a418b2e447884a1082a14e629baa9b46d994fc69a59f5
|
||||
AUX dhcp-3.1.3-dhclient-no-down-1.patch 2948 SHA256 d4e9d5fdf124aa8a359a22f2f244033710c4831176cf8904c32c10ff4b1f4f16 SHA512 bdfff929c980743b9f6250ac9feff1b519c8b288190dc021f657cc18bd8d72f2a3752f65c36d2aac67f6d2c4aa9471fc8cad496edef43d6d7517ecabccd50338 WHIRLPOOL bf172297576e6f811e8bb843cb98fb567e7df73453414b17f5a22e7f87aca4b7d0d91b2f810db9085b5705d1447e8a28091db759836e3741903d3a3d95f4e94f
|
||||
AUX dhcp-3.1.3-dhclient-no-down.patch 2762 SHA256 94c9dbe45063c6c600976ffab4c1fc9ac6f52f4e8077b5074f5142816ea626c4 SHA512 40c40fe05afbe37dc78037956a6c056e520239586f895d373a309f1a3b60058cb867308ac50a7731b589dcf87a13db2676589e34ce817a5a41b821bc7fd5bc5c WHIRLPOOL 0acca442f21f306ff157a723b3a796d8671edb1fdfbeae40e76808100a6dcb4bca8119b1c3973db455f7d4193e083298ccb6a53655e160a8a826d95f41f498f1
|
||||
AUX dhcpd.conf 1092 SHA256 b86d27e0560689057b01a352474582fceb3a398eaf3b17f901378ec56284c4d5 SHA512 21467475571e914b60084a20eacba794806631c84c33e5977db0c5f3b572752c2518c807daac107ec9cbfe4d4ef0cdf54e9797d7ab064e7386b586b00619e035 WHIRLPOOL 0c9a81b3b19f6b91687db7a7ede9107afc0e50fe1ee9d86e848fa444d0da9c55798b545cb8215ec1149d48163a944d6f86969430570b26012f0a19413cff278a
|
||||
AUX dhcpd.init 1989 SHA256 916bfeb81dcb3423fd4239270ac2dce2e6dc105b28a06e03b352f6bf6b30ed1e SHA512 80ecc6ea8c22e5912c923ec31505fa3ec68deaa32de9f8df6be4f35f1b714cda943b405e3183a77553169584440fd87c0ad3006ebf706bacbd48c9744643b291 WHIRLPOOL d00a8e41b03d24d38f20b0839ea82b18344e4fe6071385ff32a7baa284b26e087dd9897455dfb498d949da9045ea9e66a0f8044225c488bae7ca88e4c389c954
|
||||
AUX dhcpd.init2 2421 SHA256 fef93e5a7264780044a977ade27e9cc70de824063791bcd07d3db81c11c16df5 SHA512 ab7f9c310ad7d6342aa996ae4a94f71e7df71ecaea569cec721637f75ba1a26681769181ef6f2eef1b11cb6bbf5827ab7503ba6012a689d82ac1b96eb918c444 WHIRLPOOL bfc0a4e31521c8b527c5c47ee449d2f2c9e84c4316fa869ba019fb31c9cc9db884d65d016a537c53874556fdc95165039705943dae32b30a8853900685cbfc2e
|
||||
AUX dhcrelay.conf 421 SHA256 409b895ed489e75c1a08f72961b45d641b93fd9357f528abc78b1fd036b7f730 SHA512 fd15dbaa4c61c3c26f407bf13dde859470a1adba134da064b653ccc152ce42635ee8de2fe113ae21ba8470e97e3caad8c1a47b69eb25e5e92b40e26790b96f6d WHIRLPOOL 8622e32e4c4681efd8f6087917f745c3e12013c04ab7ba666d72a2ce0cb55b9bdb13be13abaf7dd9d3d35a31d44bfd1d89d9bf69f6296df2b83a0b3b9fb370ae
|
||||
AUX dhcrelay.init 736 SHA256 cfdaff3a723be3935d06c14e171d4008f2ad3329bd05ac2e49c19bc0e14bc59c SHA512 4cbd52bcdf63d94ec38c3a530694e4bed29e1fcb1330e5f17db86e6e1d1fe6c75d6f55b2d6ef3090d98be1fc9b21ca053b319893e8a1478047bdb14832eef935 WHIRLPOOL 4d6925714702eb8214892afd9d5d587b5823f57be3541da1dc6904233470fcfd8fdc1356c508fc344a8697808eb208045a38983b9553c8c63595c512c6ba4279
|
||||
DIST dhcp-3.1-ESV.tar.gz 797454 SHA256 e316b7dc34f05e38724273a473f823719281f229a71a80bc358f8e74687fd7d7
|
||||
DIST ldap-for-dhcp-3.1.3-1.tar.gz 41029 SHA256 4df0daf50ddc31eb3cfd7c31226ac3d766fb37884f80fc6b96f3c3ee4a94baab
|
||||
EBUILD dhcp-3.1.4e.ebuild 8223 SHA256 b7054ee38652112faaffbc6391116de080d2aff927bbc635521fe8d6cbe570d9 SHA512 61817fec8ed3d590171cb65380d46e87ba277160e930892a8a2adbc16f25b8a26a4a5523bd2e9f41090b6004a7b63469351c338f8cca7b9a2f5e81f521ca9246 WHIRLPOOL dc561d3e6b24cdc6686ee2776e14cec6bc0588fc90b3ff5e2b906e9177b4df8ccde7ccde0f1839e4e04c13d1bdda2193bd0a81c60b38111015a195824ec0e586
|
||||
MISC ChangeLog 32166 SHA256 925816b41f160aa799772ac7a2acec8ad56018f08e62f3e255d7653426e67c85 SHA512 339c8115dadcc341fab89c14dd37197ec15e94e645d6a1ef46bf64a3bb8af295d6c9f3bf7445e5a5fa68978d67397b8987b863090a13769e37cf54ca5375b3dc WHIRLPOOL 1be298325de10118f0d0fd225960d5834e815fcebcc27184d4ac66e97fa161809dd5f816bf1f36e939fa958354d234365612b16f7c7147aa70fc218192121dc3
|
||||
MISC metadata.xml 358 SHA256 8665f24cdfcc09576b595f8bd257333ff5f9ea7ee0ca2925ba6fb74d90e12415 SHA512 64685f52281efc1f6ea84cbb43f9db216f226f7feebe1384ec8bde50825744e9701dd0448621be7b7dacb0ea580f4f7d47733e70f4b6a77d0df39bc802f6ac4b WHIRLPOOL 3565dfbfc2460fca0d12bcf22f69a60a9a5cb181d23b29c7c8f97c6d1c0978fb8b5fe7f38c364027a76636446ba8327b4cc63fef269168169293a9d6592d1f57
|
||||
|
@ -1,268 +0,0 @@
|
||||
# Copyright 1999-2010 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-3.1.1.ebuild,v 1.9 2008/11/05 00:41:46 vapier Exp $
|
||||
|
||||
inherit eutils flag-o-matic multilib toolchain-funcs
|
||||
|
||||
LDAP_PV="3.1.2-2"
|
||||
|
||||
MY_PV="${PV//_alpha/a}"
|
||||
MY_PV="${MY_PV//_beta/b}"
|
||||
MY_PV="${MY_PV//_rc/rc}"
|
||||
MY_P="${PN}-${MY_PV}"
|
||||
MY_LDAP_PV="${LDAP_PV//-*/}"
|
||||
DESCRIPTION="ISC Dynamic Host Configuration Protocol"
|
||||
HOMEPAGE="http://www.isc.org/products/DHCP"
|
||||
SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz
|
||||
ldap? ( http://cloud.github.com/downloads/dcantrell/ldap-for-dhcp/ldap-for-dhcp-${LDAP_PV}.tar.gz
|
||||
http://ftp.disconnected-by-peer.at/pub/ldap-for-dhcp-${LDAP_PV}.tar.gz )"
|
||||
|
||||
LICENSE="as-is BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 arm hppa ~mips ppc ppc64 s390 sh sparc ~sparc-fbsd x86 ~x86-fbsd"
|
||||
IUSE="doc minimal static selinux kernel_linux ldap"
|
||||
|
||||
DEPEND="selinux? ( sec-policy/selinux-dhcp )
|
||||
kernel_linux? ( sys-apps/net-tools )
|
||||
ldap? ( net-nds/openldap
|
||||
dev-libs/openssl )"
|
||||
|
||||
PROVIDE="virtual/dhcpc"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
cd "${S}"
|
||||
|
||||
# Gentoo patches - these will probably never be accepted upstream
|
||||
# Enable chroot support
|
||||
epatch "${FILESDIR}/${PN}"-3.0-paranoia.patch
|
||||
# Fix some permission issues
|
||||
epatch "${FILESDIR}/${PN}"-3.0-fix-perms.patch
|
||||
# Enable dhclient to equery NTP servers
|
||||
epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-ntp.patch
|
||||
# resolvconf support in dhclient-script
|
||||
epatch "${FILESDIR}/${PN}"-3.1.0a1-dhclient-resolvconf.patch
|
||||
# Fix setting hostnames on Linux
|
||||
epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-hostname.patch
|
||||
# Allow mtu settings
|
||||
epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-mtu.patch
|
||||
# Allow dhclient to use IF_METRIC to set route metrics
|
||||
epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-metric.patch
|
||||
# Stop downing the interface on Linux as that breaks link dameons
|
||||
# such as wpa_supplicant and netplug
|
||||
epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-no-down.patch
|
||||
# Quiet the isc blurb
|
||||
epatch "${FILESDIR}/${PN}"-3.0.3-no_isc_blurb.patch
|
||||
# Enable dhclient to get extra configuration from stdin
|
||||
epatch "${FILESDIR}/${PN}"-3.0.4-dhclient-stdin-conf.patch
|
||||
# Disable fallback interfaces when using BPF
|
||||
# This allows more than one dhclient instance on the BSD's
|
||||
epatch "${FILESDIR}/${PN}"-3.0.5-bpf-nofallback.patch
|
||||
|
||||
# General fixes which will probably be accepted upstream eventually
|
||||
# Install libdst, #75544
|
||||
epatch "${FILESDIR}/${PN}"-3.0.3-libdst.patch
|
||||
# Fix building on Gentoo/FreeBSD
|
||||
epatch "${FILESDIR}/${PN}"-3.0.2-gmake.patch
|
||||
|
||||
# NetworkManager support patches
|
||||
# If they fail to apply to future versions they will be dropped
|
||||
# Add dbus support to dhclient
|
||||
epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-dbus.patch
|
||||
|
||||
# Ldap patch for dhcp
|
||||
# buggy build system so don*t patch when no ldap build
|
||||
use ldap && epatch "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}/dhcp-${MY_LDAP_PV}"-ldap.patch
|
||||
|
||||
# Brand the version with Gentoo
|
||||
# include revision if >0
|
||||
local newver="${MY_PV}-Gentoo"
|
||||
[[ ${PR} != "r0" ]] && newver="${newver}-${PR}"
|
||||
sed -i '/^#define DHCP_VERSION[ \t]\+/ s/'"${MY_PV}/${newver}/g" \
|
||||
includes/version.h || die
|
||||
|
||||
# Change the hook script locations of the scripts
|
||||
sed -i -e 's,/etc/dhclient-exit-hooks,/etc/dhcp/dhclient-exit-hooks,g' \
|
||||
-e 's,/etc/dhclient-enter-hooks,/etc/dhcp/dhclient-enter-hooks,g' \
|
||||
client/scripts/* || die
|
||||
|
||||
# No need for the linux script to force bash, #158540.
|
||||
sed -i -e 's,#!/bin/bash,#!/bin/sh,' client/scripts/linux || die
|
||||
|
||||
# Quiet the freebsd logger a little
|
||||
sed -i -e '/LOGGER=/ s/-s -p user.notice //g' client/scripts/freebsd || die
|
||||
|
||||
# Remove these options from the sample config
|
||||
sed -i -e "/\(script\|host-name\|domain-name\) / d" \
|
||||
client/dhclient.conf || die
|
||||
|
||||
# Build sed man pages as we don't ever support BSD 4.4 and older, #130251.
|
||||
local x=
|
||||
for x in Makefile.dist $(ls */Makefile.dist) ; do
|
||||
sed -i -e 's/$(CATMANPAGES)/$(SEDMANPAGES)/g' "${x}" || die
|
||||
done
|
||||
|
||||
# Only install different man pages if we don't have en
|
||||
if [[ " ${LINGUAS} " != *" en "* ]]; then
|
||||
# Install Japanese man pages
|
||||
if [[ " ${LINGUAS} " == *" ja "* && -d doc/ja_JP.eucJP ]]; then
|
||||
einfo "Installing Japanese documention"
|
||||
cp doc/ja_JP.eucJP/dhclient* client
|
||||
cp doc/ja_JP.eucJP/dhcp* common
|
||||
fi
|
||||
fi
|
||||
|
||||
# Now remove the non-english docs so there are no errors later
|
||||
[[ -d doc/ja_JP.eucJP ]] && rm -rf doc/ja_JP.eucJP
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
use static && append-ldflags -static
|
||||
|
||||
cat <<-END >> includes/site.h
|
||||
#define _PATH_DHCPD_CONF "/etc/dhcp/dhcpd.conf"
|
||||
#define _PATH_DHCPD_PID "/var/run/dhcp/dhcpd.pid"
|
||||
#define _PATH_DHCPD_DB "/var/lib/dhcp/dhcpd.leases"
|
||||
#define _PATH_DHCLIENT_CONF "/etc/dhcp/dhclient.conf"
|
||||
#define _PATH_DHCLIENT_DB "/var/lib/dhcp/dhclient.leases"
|
||||
#define _PATH_DHCLIENT_PID "/var/run/dhcp/dhclient.pid"
|
||||
#define DHCPD_LOG_FACILITY LOG_LOCAL1
|
||||
END
|
||||
if use ldap ; then
|
||||
echo "#define LDAP_CONFIGURATION" >> includes/site.h
|
||||
echo "#define USE_SSL" >> includes/site.h
|
||||
fi
|
||||
|
||||
cat <<-END > site.conf
|
||||
CC = $(tc-getCC)
|
||||
LFLAGS = ${LDFLAGS}
|
||||
LIBDIR = /usr/$(get_libdir)
|
||||
INCDIR = /usr/include
|
||||
ETC = /etc/dhcp
|
||||
VARDB = /var/lib/dhcp
|
||||
VARRUN = /var/run/dhcp
|
||||
ADMMANDIR = /usr/share/man/man8
|
||||
ADMMANEXT = .8
|
||||
FFMANDIR = /usr/share/man/man5
|
||||
FFMANEXT = .5
|
||||
LIBMANDIR = /usr/share/man/man3
|
||||
LIBMANEXT = .3
|
||||
USRMANDIR = /usr/share/man/man1
|
||||
USRMANEXT = .1
|
||||
MANCAT = man
|
||||
END
|
||||
if use ldap ; then
|
||||
echo "LDAPLIB = -lldap" >> site.conf
|
||||
echo "SSLLIB = -lcrypto -lssl" >> site.conf
|
||||
fi
|
||||
|
||||
./configure --copts "-DPARANOIA -DEARLY_CHROOT ${CFLAGS}" \
|
||||
|| die "configure failed"
|
||||
|
||||
# Remove server support from the Makefile
|
||||
# We still install some extra crud though
|
||||
if use minimal ; then
|
||||
sed -i -e 's/\(server\|relay\|dhcpctl\)/ /g' work.*/Makefile || die
|
||||
fi
|
||||
emake || die "compile problem"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
make install DESTDIR="${D}" || die
|
||||
if use doc; then
|
||||
dodoc README RELNOTES doc/*
|
||||
use ldap && dodoc "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/*.ldap "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/draft-ietf-dhc-ldap-schema-01.txt
|
||||
fi
|
||||
|
||||
insinto /etc/dhcp
|
||||
newins client/dhclient.conf dhclient.conf.sample
|
||||
keepdir /var/{lib,run}/dhcp
|
||||
keepdir /var/lib/dhclient
|
||||
|
||||
# Install our server files
|
||||
if ! use minimal ; then
|
||||
insinto /etc/dhcp
|
||||
newins server/dhcpd.conf dhcpd.conf.sample
|
||||
newinitd "${FILESDIR}"/dhcpd.init dhcpd
|
||||
newinitd "${FILESDIR}"/dhcrelay.init dhcrelay
|
||||
newconfd "${FILESDIR}"/dhcpd.conf dhcpd
|
||||
newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay
|
||||
|
||||
# install ldap files
|
||||
if use ldap; then
|
||||
insinto /etc/openldap/schema
|
||||
doins "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/dhcp.*
|
||||
dosbin "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/dhcpd-conf-to-ldap
|
||||
fi
|
||||
|
||||
# We never want portage to own this file
|
||||
rm -f "${D}"/var/lib/dhcp/dhcpd.leases
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
if ! use minimal ; then
|
||||
enewgroup dhcp
|
||||
enewuser dhcp -1 -1 /var/lib/dhcp dhcp
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use minimal && return
|
||||
|
||||
chown dhcp:dhcp "${ROOT}"/var/{lib,run}/dhcp
|
||||
|
||||
if [[ -e "${ROOT}"/etc/init.d/dhcp ]] ; then
|
||||
ewarn
|
||||
ewarn "WARNING: The dhcp init script has been renamed to dhcpd"
|
||||
ewarn "/etc/init.d/dhcp and /etc/conf.d/dhcp need to be removed and"
|
||||
ewarn "and dhcp should be removed from the default runlevel"
|
||||
ewarn
|
||||
fi
|
||||
|
||||
einfo "You can edit /etc/conf.d/dhcpd to customize dhcp settings."
|
||||
einfo
|
||||
einfo "If you would like to run dhcpd in a chroot, simply configure the"
|
||||
einfo "DHCPD_CHROOT directory in /etc/conf.d/dhcpd and then run:"
|
||||
einfo " emerge --config =${PF}"
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
if use minimal ; then
|
||||
eerror "${PN} has not been compiled for server support"
|
||||
eerror "emerge ${PN} without the minimal USE flag to use dhcp sever"
|
||||
return 1
|
||||
fi
|
||||
|
||||
local CHROOT="$(
|
||||
sed -n -e 's/^[[:blank:]]\?DHCPD_CHROOT="*\([^#"]\+\)"*/\1/p' \
|
||||
"${ROOT}"/etc/conf.d/dhcpd
|
||||
)"
|
||||
|
||||
if [[ -z ${CHROOT} ]]; then
|
||||
eerror "CHROOT not defined in /etc/conf.d/dhcpd"
|
||||
return 1
|
||||
fi
|
||||
|
||||
CHROOT="${ROOT}/${CHROOT}"
|
||||
|
||||
if [[ -d ${CHROOT} ]] ; then
|
||||
ewarn "${CHROOT} already exists - aborting"
|
||||
return 0
|
||||
fi
|
||||
|
||||
ebegin "Setting up the chroot directory"
|
||||
mkdir -m 0755 -p "${CHROOT}/"{dev,etc,var/lib,var/run/dhcp}
|
||||
cp /etc/{localtime,resolv.conf} "${CHROOT}"/etc
|
||||
cp -R /etc/dhcp "${CHROOT}"/etc
|
||||
cp -R /var/lib/dhcp "${CHROOT}"/var/lib
|
||||
ln -s ../../var/lib/dhcp "${CHROOT}"/etc/dhcp/lib
|
||||
chown -R dhcp:dhcp "${CHROOT}"/var/{lib,run}/dhcp
|
||||
eend 0
|
||||
|
||||
local logger="$(best_version virtual/logger)"
|
||||
einfo "To enable logging from the dhcpd server, configure your"
|
||||
einfo "logger (${logger}) to listen on ${CHROOT}/dev/log"
|
||||
}
|
@ -1,269 +0,0 @@
|
||||
# Copyright 1999-2010 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-3.1.1.ebuild,v 1.9 2008/11/05 00:41:46 vapier Exp $
|
||||
|
||||
inherit eutils flag-o-matic multilib toolchain-funcs
|
||||
|
||||
LDAP_PV="3.1.2-2"
|
||||
|
||||
MY_PV="${PV//_alpha/a}"
|
||||
MY_PV="${MY_PV//_beta/b}"
|
||||
MY_PV="${MY_PV//_rc/rc}"
|
||||
MY_PV="${MY_PV//_p/p}"
|
||||
MY_P="${PN}-${MY_PV}"
|
||||
MY_LDAP_PV="${LDAP_PV//-*/}"
|
||||
DESCRIPTION="ISC Dynamic Host Configuration Protocol"
|
||||
HOMEPAGE="http://www.isc.org/products/DHCP"
|
||||
SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz
|
||||
ldap? ( http://cloud.github.com/downloads/dcantrell/ldap-for-dhcp/ldap-for-dhcp-${LDAP_PV}.tar.gz
|
||||
http://ftp.disconnected-by-peer.at/pub/ldap-for-dhcp-${LDAP_PV}.tar.gz )"
|
||||
|
||||
LICENSE="as-is BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 arm hppa ~mips ppc ppc64 s390 sh sparc ~sparc-fbsd x86 ~x86-fbsd"
|
||||
IUSE="doc minimal static selinux kernel_linux ldap"
|
||||
|
||||
DEPEND="selinux? ( sec-policy/selinux-dhcp )
|
||||
kernel_linux? ( sys-apps/net-tools )
|
||||
ldap? ( net-nds/openldap
|
||||
dev-libs/openssl )"
|
||||
|
||||
PROVIDE="virtual/dhcpc"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
cd "${S}"
|
||||
|
||||
# Gentoo patches - these will probably never be accepted upstream
|
||||
# Enable chroot support
|
||||
epatch "${FILESDIR}/${PN}"-3.0-paranoia.patch
|
||||
# Fix some permission issues
|
||||
epatch "${FILESDIR}/${PN}"-3.0-fix-perms.patch
|
||||
# Enable dhclient to equery NTP servers
|
||||
epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-ntp.patch
|
||||
# resolvconf support in dhclient-script
|
||||
epatch "${FILESDIR}/${PN}"-3.1.0a1-dhclient-resolvconf.patch
|
||||
# Fix setting hostnames on Linux
|
||||
epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-hostname.patch
|
||||
# Allow mtu settings
|
||||
epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-mtu.patch
|
||||
# Allow dhclient to use IF_METRIC to set route metrics
|
||||
epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-metric.patch
|
||||
# Stop downing the interface on Linux as that breaks link dameons
|
||||
# such as wpa_supplicant and netplug
|
||||
epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-no-down.patch
|
||||
# Quiet the isc blurb
|
||||
epatch "${FILESDIR}/${PN}"-3.0.3-no_isc_blurb.patch
|
||||
# Enable dhclient to get extra configuration from stdin
|
||||
epatch "${FILESDIR}/${PN}"-3.0.4-dhclient-stdin-conf.patch
|
||||
# Disable fallback interfaces when using BPF
|
||||
# This allows more than one dhclient instance on the BSD's
|
||||
epatch "${FILESDIR}/${PN}"-3.0.5-bpf-nofallback.patch
|
||||
|
||||
# General fixes which will probably be accepted upstream eventually
|
||||
# Install libdst, #75544
|
||||
epatch "${FILESDIR}/${PN}"-3.0.3-libdst.patch
|
||||
# Fix building on Gentoo/FreeBSD
|
||||
epatch "${FILESDIR}/${PN}"-3.0.2-gmake.patch
|
||||
|
||||
# NetworkManager support patches
|
||||
# If they fail to apply to future versions they will be dropped
|
||||
# Add dbus support to dhclient
|
||||
epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-dbus.patch
|
||||
|
||||
# Ldap patch for dhcp
|
||||
# buggy build system so don*t patch when no ldap build
|
||||
use ldap && epatch "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}/dhcp-${MY_LDAP_PV}"-ldap.patch
|
||||
|
||||
# Brand the version with Gentoo
|
||||
# include revision if >0
|
||||
local newver="${MY_PV}-Gentoo"
|
||||
[[ ${PR} != "r0" ]] && newver="${newver}-${PR}"
|
||||
sed -i '/^#define DHCP_VERSION[ \t]\+/ s/'"${MY_PV}/${newver}/g" \
|
||||
includes/version.h || die
|
||||
|
||||
# Change the hook script locations of the scripts
|
||||
sed -i -e 's,/etc/dhclient-exit-hooks,/etc/dhcp/dhclient-exit-hooks,g' \
|
||||
-e 's,/etc/dhclient-enter-hooks,/etc/dhcp/dhclient-enter-hooks,g' \
|
||||
client/scripts/* || die
|
||||
|
||||
# No need for the linux script to force bash, #158540.
|
||||
sed -i -e 's,#!/bin/bash,#!/bin/sh,' client/scripts/linux || die
|
||||
|
||||
# Quiet the freebsd logger a little
|
||||
sed -i -e '/LOGGER=/ s/-s -p user.notice //g' client/scripts/freebsd || die
|
||||
|
||||
# Remove these options from the sample config
|
||||
sed -i -e "/\(script\|host-name\|domain-name\) / d" \
|
||||
client/dhclient.conf || die
|
||||
|
||||
# Build sed man pages as we don't ever support BSD 4.4 and older, #130251.
|
||||
local x=
|
||||
for x in Makefile.dist $(ls */Makefile.dist) ; do
|
||||
sed -i -e 's/$(CATMANPAGES)/$(SEDMANPAGES)/g' "${x}" || die
|
||||
done
|
||||
|
||||
# Only install different man pages if we don't have en
|
||||
if [[ " ${LINGUAS} " != *" en "* ]]; then
|
||||
# Install Japanese man pages
|
||||
if [[ " ${LINGUAS} " == *" ja "* && -d doc/ja_JP.eucJP ]]; then
|
||||
einfo "Installing Japanese documention"
|
||||
cp doc/ja_JP.eucJP/dhclient* client
|
||||
cp doc/ja_JP.eucJP/dhcp* common
|
||||
fi
|
||||
fi
|
||||
|
||||
# Now remove the non-english docs so there are no errors later
|
||||
[[ -d doc/ja_JP.eucJP ]] && rm -rf doc/ja_JP.eucJP
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
use static && append-ldflags -static
|
||||
|
||||
cat <<-END >> includes/site.h
|
||||
#define _PATH_DHCPD_CONF "/etc/dhcp/dhcpd.conf"
|
||||
#define _PATH_DHCPD_PID "/var/run/dhcp/dhcpd.pid"
|
||||
#define _PATH_DHCPD_DB "/var/lib/dhcp/dhcpd.leases"
|
||||
#define _PATH_DHCLIENT_CONF "/etc/dhcp/dhclient.conf"
|
||||
#define _PATH_DHCLIENT_DB "/var/lib/dhcp/dhclient.leases"
|
||||
#define _PATH_DHCLIENT_PID "/var/run/dhcp/dhclient.pid"
|
||||
#define DHCPD_LOG_FACILITY LOG_LOCAL1
|
||||
END
|
||||
if use ldap ; then
|
||||
echo "#define LDAP_CONFIGURATION" >> includes/site.h
|
||||
echo "#define USE_SSL" >> includes/site.h
|
||||
fi
|
||||
|
||||
cat <<-END > site.conf
|
||||
CC = $(tc-getCC)
|
||||
LFLAGS = ${LDFLAGS}
|
||||
LIBDIR = /usr/$(get_libdir)
|
||||
INCDIR = /usr/include
|
||||
ETC = /etc/dhcp
|
||||
VARDB = /var/lib/dhcp
|
||||
VARRUN = /var/run/dhcp
|
||||
ADMMANDIR = /usr/share/man/man8
|
||||
ADMMANEXT = .8
|
||||
FFMANDIR = /usr/share/man/man5
|
||||
FFMANEXT = .5
|
||||
LIBMANDIR = /usr/share/man/man3
|
||||
LIBMANEXT = .3
|
||||
USRMANDIR = /usr/share/man/man1
|
||||
USRMANEXT = .1
|
||||
MANCAT = man
|
||||
END
|
||||
if use ldap ; then
|
||||
echo "LDAPLIB = -lldap" >> site.conf
|
||||
echo "SSLLIB = -lcrypto -lssl" >> site.conf
|
||||
fi
|
||||
|
||||
./configure --copts "-DPARANOIA -DEARLY_CHROOT ${CFLAGS}" \
|
||||
|| die "configure failed"
|
||||
|
||||
# Remove server support from the Makefile
|
||||
# We still install some extra crud though
|
||||
if use minimal ; then
|
||||
sed -i -e 's/\(server\|relay\|dhcpctl\)/ /g' work.*/Makefile || die
|
||||
fi
|
||||
emake || die "compile problem"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
make install DESTDIR="${D}" || die
|
||||
if use doc; then
|
||||
dodoc README RELNOTES doc/*
|
||||
use ldap && dodoc "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/*.ldap "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/draft-ietf-dhc-ldap-schema-01.txt
|
||||
fi
|
||||
|
||||
insinto /etc/dhcp
|
||||
newins client/dhclient.conf dhclient.conf.sample
|
||||
keepdir /var/{lib,run}/dhcp
|
||||
keepdir /var/lib/dhclient
|
||||
|
||||
# Install our server files
|
||||
if ! use minimal ; then
|
||||
insinto /etc/dhcp
|
||||
newins server/dhcpd.conf dhcpd.conf.sample
|
||||
newinitd "${FILESDIR}"/dhcpd.init dhcpd
|
||||
newinitd "${FILESDIR}"/dhcrelay.init dhcrelay
|
||||
newconfd "${FILESDIR}"/dhcpd.conf dhcpd
|
||||
newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay
|
||||
|
||||
# install ldap files
|
||||
if use ldap; then
|
||||
insinto /etc/openldap/schema
|
||||
doins "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/dhcp.*
|
||||
dosbin "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/dhcpd-conf-to-ldap
|
||||
fi
|
||||
|
||||
# We never want portage to own this file
|
||||
rm -f "${D}"/var/lib/dhcp/dhcpd.leases
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
if ! use minimal ; then
|
||||
enewgroup dhcp
|
||||
enewuser dhcp -1 -1 /var/lib/dhcp dhcp
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use minimal && return
|
||||
|
||||
chown dhcp:dhcp "${ROOT}"/var/{lib,run}/dhcp
|
||||
|
||||
if [[ -e "${ROOT}"/etc/init.d/dhcp ]] ; then
|
||||
ewarn
|
||||
ewarn "WARNING: The dhcp init script has been renamed to dhcpd"
|
||||
ewarn "/etc/init.d/dhcp and /etc/conf.d/dhcp need to be removed and"
|
||||
ewarn "and dhcp should be removed from the default runlevel"
|
||||
ewarn
|
||||
fi
|
||||
|
||||
einfo "You can edit /etc/conf.d/dhcpd to customize dhcp settings."
|
||||
einfo
|
||||
einfo "If you would like to run dhcpd in a chroot, simply configure the"
|
||||
einfo "DHCPD_CHROOT directory in /etc/conf.d/dhcpd and then run:"
|
||||
einfo " emerge --config =${PF}"
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
if use minimal ; then
|
||||
eerror "${PN} has not been compiled for server support"
|
||||
eerror "emerge ${PN} without the minimal USE flag to use dhcp sever"
|
||||
return 1
|
||||
fi
|
||||
|
||||
local CHROOT="$(
|
||||
sed -n -e 's/^[[:blank:]]\?DHCPD_CHROOT="*\([^#"]\+\)"*/\1/p' \
|
||||
"${ROOT}"/etc/conf.d/dhcpd
|
||||
)"
|
||||
|
||||
if [[ -z ${CHROOT} ]]; then
|
||||
eerror "CHROOT not defined in /etc/conf.d/dhcpd"
|
||||
return 1
|
||||
fi
|
||||
|
||||
CHROOT="${ROOT}/${CHROOT}"
|
||||
|
||||
if [[ -d ${CHROOT} ]] ; then
|
||||
ewarn "${CHROOT} already exists - aborting"
|
||||
return 0
|
||||
fi
|
||||
|
||||
ebegin "Setting up the chroot directory"
|
||||
mkdir -m 0755 -p "${CHROOT}/"{dev,etc,var/lib,var/run/dhcp}
|
||||
cp /etc/{localtime,resolv.conf} "${CHROOT}"/etc
|
||||
cp -R /etc/dhcp "${CHROOT}"/etc
|
||||
cp -R /var/lib/dhcp "${CHROOT}"/var/lib
|
||||
ln -s ../../var/lib/dhcp "${CHROOT}"/etc/dhcp/lib
|
||||
chown -R dhcp:dhcp "${CHROOT}"/var/{lib,run}/dhcp
|
||||
eend 0
|
||||
|
||||
local logger="$(best_version virtual/logger)"
|
||||
einfo "To enable logging from the dhcpd server, configure your"
|
||||
einfo "logger (${logger}) to listen on ${CHROOT}/dev/log"
|
||||
}
|
@ -1,263 +0,0 @@
|
||||
# Copyright 1999-2010 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-3.1.2_p1.ebuild,v 1.9 2010/01/15 19:00:22 ulm Exp $
|
||||
|
||||
inherit eutils flag-o-matic multilib toolchain-funcs
|
||||
|
||||
LDAP_PV="3.1.3-1"
|
||||
|
||||
MY_PV="${PV//_alpha/a}"
|
||||
MY_PV="${MY_PV//_beta/b}"
|
||||
MY_PV="${MY_PV//_rc/rc}"
|
||||
MY_PV="${MY_PV//_p/p}"
|
||||
MY_P="${PN}-${MY_PV}"
|
||||
MY_LDAP_PV="${LDAP_PV//-*/}"
|
||||
|
||||
DESCRIPTION="ISC Dynamic Host Configuration Protocol"
|
||||
HOMEPAGE="http://www.isc.org/products/DHCP"
|
||||
SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz
|
||||
ldap? ( http://cloud.github.com/downloads/dcantrell/ldap-for-dhcp/ldap-for-dhcp-${LDAP_PV}.tar.gz
|
||||
http://ftp.disconnected-by-peer.at/pub/ldap-for-dhcp-${LDAP_PV}.tar.gz )"
|
||||
|
||||
LICENSE="as-is BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="alpha amd64 arm hppa ~mips ppc ppc64 s390 sh sparc ~sparc-fbsd x86 ~x86-fbsd"
|
||||
IUSE="doc minimal static selinux kernel_linux ldap ssl"
|
||||
|
||||
DEPEND="selinux? ( sec-policy/selinux-dhcp )
|
||||
kernel_linux? ( sys-apps/net-tools )
|
||||
ldap? ( net-nds/openldap
|
||||
ssl? ( dev-libs/openssl ) )"
|
||||
|
||||
PROVIDE="virtual/dhcpc"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
cd "${S}"
|
||||
|
||||
# Gentoo patches - these will probably never be accepted upstream
|
||||
# Enable chroot support
|
||||
epatch "${FILESDIR}/${PN}"-3.0-paranoia.patch
|
||||
# Fix some permission issues
|
||||
epatch "${FILESDIR}/${PN}"-3.0-fix-perms.patch
|
||||
# Enable dhclient to equery NTP servers
|
||||
epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-ntp.patch
|
||||
# resolvconf support in dhclient-script
|
||||
epatch "${FILESDIR}/${PN}"-3.1.0a1-dhclient-resolvconf.patch
|
||||
# Stop downing the interface on Linux as that breaks link dameons
|
||||
# such as wpa_supplicant and netplug
|
||||
epatch "${FILESDIR}/${PN}"-3.1.3-dhclient-no-down-1.patch
|
||||
# Quiet the isc blurb
|
||||
epatch "${FILESDIR}/${PN}"-3.0.3-no_isc_blurb.patch
|
||||
# Enable dhclient to get extra configuration from stdin
|
||||
epatch "${FILESDIR}/${PN}"-3.0.4-dhclient-stdin-conf.patch
|
||||
# Disable fallback interfaces when using BPF
|
||||
# This allows more than one dhclient instance on the BSD's
|
||||
epatch "${FILESDIR}/${PN}"-3.0.5-bpf-nofallback.patch
|
||||
|
||||
# General fixes which will probably be accepted upstream eventually
|
||||
# Install libdst, #75544
|
||||
epatch "${FILESDIR}/${PN}"-3.0.3-libdst.patch
|
||||
# Fix building on Gentoo/FreeBSD
|
||||
epatch "${FILESDIR}/${PN}"-3.0.2-gmake.patch
|
||||
|
||||
# NetworkManager support patches
|
||||
# If they fail to apply to future versions they will be dropped
|
||||
# Add dbus support to dhclient
|
||||
epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-dbus.patch
|
||||
|
||||
# Ldap patch for dhcp
|
||||
epatch "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}/dhcp-${MY_LDAP_PV}"-ldap.patch
|
||||
|
||||
# Brand the version with Gentoo
|
||||
# include revision if >0
|
||||
local newver="${MY_PV}-Gentoo"
|
||||
[[ ${PR} != "r0" ]] && newver="${newver}-${PR}"
|
||||
sed -i '/^#define DHCP_VERSION[ \t]\+/ s/'"${MY_PV}/${newver}/g" \
|
||||
includes/version.h || die
|
||||
|
||||
# Change the hook script locations of the scripts
|
||||
sed -i -e 's,/etc/dhclient-exit-hooks,/etc/dhcp/dhclient-exit-hooks,g' \
|
||||
-e 's,/etc/dhclient-enter-hooks,/etc/dhcp/dhclient-enter-hooks,g' \
|
||||
client/scripts/* || die
|
||||
|
||||
# No need for the linux script to force bash, #158540.
|
||||
sed -i -e 's,#!/bin/bash,#!/bin/sh,' client/scripts/linux || die
|
||||
|
||||
# Quiet the freebsd logger a little
|
||||
sed -i -e '/LOGGER=/ s/-s -p user.notice //g' client/scripts/freebsd || die
|
||||
|
||||
# Remove these options from the sample config
|
||||
sed -i -e "/\(script\|host-name\|domain-name\) / d" \
|
||||
client/dhclient.conf || die
|
||||
|
||||
# Build sed man pages as we don't ever support BSD 4.4 and older, #130251.
|
||||
local x=
|
||||
for x in Makefile.dist $(ls */Makefile.dist) ; do
|
||||
sed -i -e 's/$(CATMANPAGES)/$(SEDMANPAGES)/g' "${x}" || die
|
||||
done
|
||||
|
||||
# Only install different man pages if we don't have en
|
||||
if [[ " ${LINGUAS} " != *" en "* ]]; then
|
||||
# Install Japanese man pages
|
||||
if [[ " ${LINGUAS} " == *" ja "* && -d doc/ja_JP.eucJP ]]; then
|
||||
einfo "Installing Japanese documention"
|
||||
cp doc/ja_JP.eucJP/dhclient* client
|
||||
cp doc/ja_JP.eucJP/dhcp* common
|
||||
fi
|
||||
fi
|
||||
|
||||
# Now remove the non-english docs so there are no errors later
|
||||
[[ -d doc/ja_JP.eucJP ]] && rm -rf doc/ja_JP.eucJP
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
use static && append-ldflags -static
|
||||
|
||||
cat <<-END >> includes/site.h
|
||||
#define _PATH_DHCPD_CONF "/etc/dhcp/dhcpd.conf"
|
||||
#define _PATH_DHCPD_PID "/var/run/dhcp/dhcpd.pid"
|
||||
#define _PATH_DHCPD_DB "/var/lib/dhcp/dhcpd.leases"
|
||||
#define _PATH_DHCLIENT_CONF "/etc/dhcp/dhclient.conf"
|
||||
#define _PATH_DHCLIENT_DB "/var/lib/dhcp/dhclient.leases"
|
||||
#define _PATH_DHCLIENT_PID "/var/run/dhcp/dhclient.pid"
|
||||
#define DHCPD_LOG_FACILITY LOG_LOCAL1
|
||||
END
|
||||
if use ldap ; then
|
||||
echo "#define LDAP_CONFIGURATION" >> includes/site.h
|
||||
use ssl && echo "#define USE_SSL" >> includes/site.h
|
||||
fi
|
||||
|
||||
cat <<-END > site.conf
|
||||
CC = $(tc-getCC)
|
||||
LFLAGS = ${LDFLAGS}
|
||||
LIBDIR = /usr/$(get_libdir)
|
||||
INCDIR = /usr/include
|
||||
ETC = /etc/dhcp
|
||||
VARDB = /var/lib/dhcp
|
||||
VARRUN = /var/run/dhcp
|
||||
ADMMANDIR = /usr/share/man/man8
|
||||
ADMMANEXT = .8
|
||||
FFMANDIR = /usr/share/man/man5
|
||||
FFMANEXT = .5
|
||||
LIBMANDIR = /usr/share/man/man3
|
||||
LIBMANEXT = .3
|
||||
USRMANDIR = /usr/share/man/man1
|
||||
USRMANEXT = .1
|
||||
MANCAT = man
|
||||
END
|
||||
if use ldap ; then
|
||||
echo "LDAPLIB = -lldap" >> site.conf
|
||||
use ssl && echo "SSLLIB = -lcrypto -lssl" >> site.conf
|
||||
fi
|
||||
|
||||
./configure --copts "-DPARANOIA -DEARLY_CHROOT ${CFLAGS}" \
|
||||
|| die "configure failed"
|
||||
|
||||
# Remove server support from the Makefile
|
||||
# We still install some extra crud though
|
||||
if use minimal ; then
|
||||
sed -i -e 's/\(server\|relay\|dhcpctl\)/ /g' work.*/Makefile || die
|
||||
fi
|
||||
emake || die "compile problem"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
make install DESTDIR="${D}" || die
|
||||
if use doc; then
|
||||
dodoc README RELNOTES doc/*
|
||||
use ldap && dodoc "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/*.ldap "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/draft-ietf-dhc-ldap-schema-01.txt
|
||||
fi
|
||||
|
||||
insinto /etc/dhcp
|
||||
newins client/dhclient.conf dhclient.conf.sample
|
||||
keepdir /var/{lib,run}/dhcp
|
||||
keepdir /var/lib/dhclient
|
||||
|
||||
# Install our server files
|
||||
if ! use minimal ; then
|
||||
insinto /etc/dhcp
|
||||
newins server/dhcpd.conf dhcpd.conf.sample
|
||||
newinitd "${FILESDIR}"/dhcpd.init2 dhcpd
|
||||
newinitd "${FILESDIR}"/dhcrelay.init dhcrelay
|
||||
newconfd "${FILESDIR}"/dhcpd.conf dhcpd
|
||||
newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay
|
||||
|
||||
# install ldap files
|
||||
if use ldap; then
|
||||
insinto /etc/openldap/schema
|
||||
doins "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/dhcp.*
|
||||
dosbin "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/dhcpd-conf-to-ldap
|
||||
fi
|
||||
|
||||
# We never want portage to own this file
|
||||
rm -f "${D}"/var/lib/dhcp/dhcpd.leases
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
if ! use minimal ; then
|
||||
enewgroup dhcp
|
||||
enewuser dhcp -1 -1 /var/lib/dhcp dhcp
|
||||
fi
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
use minimal && return
|
||||
|
||||
chown -R dhcp:dhcp "${ROOT}"/var/{lib,run}/dhcp
|
||||
|
||||
if [[ -e "${ROOT}"/etc/init.d/dhcp ]] ; then
|
||||
ewarn
|
||||
ewarn "WARNING: The dhcp init script has been renamed to dhcpd"
|
||||
ewarn "/etc/init.d/dhcp and /etc/conf.d/dhcp need to be removed and"
|
||||
ewarn "and dhcp should be removed from the default runlevel"
|
||||
ewarn
|
||||
fi
|
||||
|
||||
einfo "You can edit /etc/conf.d/dhcpd to customize dhcp settings."
|
||||
einfo
|
||||
einfo "If you would like to run dhcpd in a chroot, simply configure the"
|
||||
einfo "DHCPD_CHROOT directory in /etc/conf.d/dhcpd and then run:"
|
||||
einfo " emerge --config =${PF}"
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
if use minimal ; then
|
||||
eerror "${PN} has not been compiled for server support"
|
||||
eerror "emerge ${PN} without the minimal USE flag to use dhcp sever"
|
||||
return 1
|
||||
fi
|
||||
|
||||
local CHROOT="$(
|
||||
sed -n -e 's/^[[:blank:]]\?DHCPD_CHROOT="*\([^#"]\+\)"*/\1/p' \
|
||||
"${ROOT}"/etc/conf.d/dhcpd
|
||||
)"
|
||||
|
||||
if [[ -z ${CHROOT} ]]; then
|
||||
eerror "CHROOT not defined in /etc/conf.d/dhcpd"
|
||||
return 1
|
||||
fi
|
||||
|
||||
CHROOT="${ROOT}/${CHROOT}"
|
||||
|
||||
if [[ -d ${CHROOT} ]] ; then
|
||||
ewarn "${CHROOT} already exists - aborting"
|
||||
return 0
|
||||
fi
|
||||
|
||||
ebegin "Setting up the chroot directory"
|
||||
mkdir -m 0755 -p "${CHROOT}/"{dev,etc,var/lib,var/run/dhcp}
|
||||
cp /etc/{localtime,resolv.conf} "${CHROOT}"/etc
|
||||
cp -R /etc/dhcp "${CHROOT}"/etc
|
||||
cp -R /var/lib/dhcp "${CHROOT}"/var/lib
|
||||
ln -s ../../var/lib/dhcp "${CHROOT}"/etc/dhcp/lib
|
||||
chown -R dhcp:dhcp "${CHROOT}"/var/{lib,run}/dhcp
|
||||
eend 0
|
||||
|
||||
local logger="$(best_version virtual/logger)"
|
||||
einfo "To enable logging from the dhcpd server, configure your"
|
||||
einfo "logger (${logger}) to listen on ${CHROOT}/dev/log"
|
||||
}
|
@ -1,235 +0,0 @@
|
||||
# Copyright 1999-2010 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-4.0.1.ebuild,v 1.2 2010/01/15 19:00:22 ulm Exp $
|
||||
|
||||
inherit eutils flag-o-matic autotools
|
||||
|
||||
LDAP_PV="4.0.1-3"
|
||||
|
||||
MY_PV="${PV//_alpha/a}"
|
||||
MY_PV="${MY_PV//_beta/b}"
|
||||
MY_PV="${MY_PV//_rc/rc}"
|
||||
MY_P="${PN}-${MY_PV}"
|
||||
MY_LDAP_PV="${LDAP_PV//-*/}"
|
||||
|
||||
DESCRIPTION="ISC Dynamic Host Configuration Protocol"
|
||||
HOMEPAGE="http://www.isc.org/products/DHCP"
|
||||
SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz
|
||||
ldap? ( http://cloud.github.com/downloads/dcantrell/ldap-for-dhcp/ldap-for-dhcp-${LDAP_PV}.tar.gz
|
||||
http://ftp.disconnected-by-peer.at/pub/ldap-for-dhcp-${LDAP_PV}.tar.gz )"
|
||||
|
||||
LICENSE="as-is BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
|
||||
IUSE="doc ipv6 selinux kernel_linux vim-syntax ldap ssl"
|
||||
|
||||
DEPEND="selinux? ( sec-policy/selinux-dhcp )
|
||||
kernel_linux? ( sys-apps/net-tools )
|
||||
vim-syntax? ( app-vim/dhcpd-syntax )
|
||||
ldap? ( net-nds/openldap
|
||||
ssl? ( dev-libs/openssl ) )"
|
||||
|
||||
PROVIDE="virtual/dhcpc"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
cd "${S}"
|
||||
|
||||
# Gentoo patches - these will probably never be accepted upstream
|
||||
# Enable chroot support
|
||||
epatch "${FILESDIR}/${PN}"-4.0-paranoia.patch
|
||||
# Fix some permission issues
|
||||
epatch "${FILESDIR}/${PN}"-3.0-fix-perms.patch
|
||||
# Enable dhclient to equery NTP servers
|
||||
epatch "${FILESDIR}/${PN}"-4.0-dhclient-ntp.patch
|
||||
# resolvconf support in dhclient-script
|
||||
epatch "${FILESDIR}/${PN}"-4.0-dhclient-resolvconf.patch
|
||||
# Fix setting hostnames on Linux
|
||||
epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-hostname.patch
|
||||
# Allow mtu settings
|
||||
epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-mtu.patch
|
||||
# Allow dhclient to use IF_METRIC to set route metrics
|
||||
epatch "${FILESDIR}/${PN}"-4.0-dhclient-metric.patch
|
||||
# Stop downing the interface on Linux as that breaks link daemons
|
||||
# such as wpa_supplicant and netplug
|
||||
epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-no-down.patch
|
||||
# Quiet the isc blurb
|
||||
epatch "${FILESDIR}/${PN}"-4.0-no_isc_blurb.patch
|
||||
# Enable dhclient to get extra configuration from stdin
|
||||
epatch "${FILESDIR}/${PN}"-4.0.1-dhclient-stdin-conf.patch
|
||||
# Disable fallback interfaces when using BPF
|
||||
# This allows more than one dhclient instance on the BSD's
|
||||
epatch "${FILESDIR}/${PN}"-3.0.5-bpf-nofallback.patch
|
||||
# This allows the software to actually compile on linux
|
||||
epatch "${FILESDIR}/${PN}"-4.0-linux-ipv6-header.patch
|
||||
# Consistent style for the if statements, also resolves
|
||||
# unary operator expected warnings (new style is wrong).
|
||||
epatch "${FILESDIR}/${PN}"-4.0-dhclient-script-correct-operators.patch
|
||||
|
||||
# NetworkManager support patches
|
||||
# If they fail to apply to future versions they will be dropped
|
||||
# Add dbus support to dhclient
|
||||
epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-dbus.patch
|
||||
|
||||
# Ldap patch for dhcp
|
||||
epatch "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}/dhcp-${MY_LDAP_PV}"-ldap.patch
|
||||
|
||||
# Brand the version with Gentoo
|
||||
# include revision if >0
|
||||
local newver="Gentoo"
|
||||
[[ ${PR} != "r0" ]] && newver="${newver}-${PR}"
|
||||
|
||||
sed -i "/AC_INIT/s/\(\[[0-9]\+\.[0-9]\+\.[0-9]\+\)/\1-${newver}/" \
|
||||
configure.ac || die
|
||||
|
||||
# Change the hook script locations of the scripts
|
||||
sed -i -e 's,/etc/dhclient-exit-hooks,/etc/dhcp/dhclient-exit-hooks,g' \
|
||||
-e 's,/etc/dhclient-enter-hooks,/etc/dhcp/dhclient-enter-hooks,g' \
|
||||
client/scripts/* || die
|
||||
|
||||
# No need for the linux script to force bash, #158540.
|
||||
sed -i -e 's,#!/bin/bash,#!/bin/sh,' client/scripts/linux || die
|
||||
|
||||
# Quiet the freebsd logger a little
|
||||
sed -i -e '/LOGGER=/ s/-s -p user.notice //g' client/scripts/freebsd || die
|
||||
|
||||
# Remove these options from the sample config
|
||||
sed -i -e "/\(script\|host-name\|domain-name\) / d" \
|
||||
client/dhclient.conf || die
|
||||
|
||||
# Only install different man pages if we don't have en
|
||||
if [[ " ${LINGUAS} " != *" en "* ]]; then
|
||||
# Install Japanese man pages
|
||||
if [[ " ${LINGUAS} " == *" ja "* && -d doc/ja_JP.eucJP ]]; then
|
||||
einfo "Installing Japanese documention"
|
||||
cp doc/ja_JP.eucJP/dhclient* client
|
||||
cp doc/ja_JP.eucJP/dhcp* common
|
||||
fi
|
||||
fi
|
||||
|
||||
# Now remove the non-english docs so there are no errors later
|
||||
[[ -d doc/ja_JP.eucJP ]] && rm -rf doc/ja_JP.eucJP
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
econf \
|
||||
--enable-paranoia \
|
||||
--sysconfdir /etc/dhcp \
|
||||
--with-cli-pid-file=/var/run/dhcp/dhclient.pid \
|
||||
--with-cli-lease-file=/var/lib/dhcp/dhclient.leases \
|
||||
--with-srv-pid-file=/var/run/dhcp/dhcpd.pid \
|
||||
--with-srv-lease-file=/var/lib/dhcp/dhcpd.leases \
|
||||
--with-relay-pid-file=/var/run/dhcp/dhcrelay.pid \
|
||||
$(use_enable ipv6 dhcpv6) \
|
||||
$(use_with ldap) \
|
||||
$(use_with ssl ldapcrypto) \
|
||||
|| die
|
||||
|
||||
emake || die "compile problem"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
for installdir in includes tests common minires dst omapip client dhcpctl relay server; do
|
||||
cd "${S}/${installdir}"
|
||||
if [ "${installdir}" == client ]; then
|
||||
make install DESTDIR="${D}" exec_prefix="" || die
|
||||
else
|
||||
make install DESTDIR="${D}" exec_prefix="/usr" || die
|
||||
fi
|
||||
done
|
||||
|
||||
cd "${S}"
|
||||
|
||||
exeinto /sbin
|
||||
if use kernel_linux; then
|
||||
newexe "${S}"/client/scripts/linux dhclient-script
|
||||
else
|
||||
newexe "${S}"/client/scripts/freebsd dhclient-script
|
||||
fi
|
||||
|
||||
if use doc; then
|
||||
dodoc README RELNOTES doc/*
|
||||
use ldap && dodoc "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/*.ldap "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/draft-ietf-dhc-ldap-schema-01.txt
|
||||
fi
|
||||
insinto /etc/dhcp
|
||||
newins client/dhclient.conf dhclient.conf.sample
|
||||
keepdir /var/{lib,run}/dhcp
|
||||
|
||||
# Install our server files
|
||||
insinto /etc/dhcp
|
||||
newins server/dhcpd.conf dhcpd.conf.sample
|
||||
newinitd "${FILESDIR}"/dhcpd.init dhcpd
|
||||
newinitd "${FILESDIR}"/dhcrelay.init dhcrelay
|
||||
newconfd "${FILESDIR}"/dhcpd.conf dhcpd
|
||||
newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay
|
||||
|
||||
# install ldap files
|
||||
if use ldap; then
|
||||
insinto /etc/openldap/schema
|
||||
doins "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/dhcp.*
|
||||
dosbin "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/dhcpd-conf-to-ldap
|
||||
fi
|
||||
|
||||
|
||||
# We never want portage to own this file
|
||||
rm -f "${D}"/var/lib/dhcp/dhcpd.leases
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
enewgroup dhcp
|
||||
enewuser dhcp -1 -1 /var/lib/dhcp dhcp
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
chown dhcp:dhcp "${ROOT}"/var/{lib,run}/dhcp
|
||||
|
||||
if [[ -e "${ROOT}"/etc/init.d/dhcp ]] ; then
|
||||
ewarn
|
||||
ewarn "WARNING: The dhcp init script has been renamed to dhcpd"
|
||||
ewarn "/etc/init.d/dhcp and /etc/conf.d/dhcp need to be removed and"
|
||||
ewarn "and dhcp should be removed from the default runlevel"
|
||||
ewarn
|
||||
fi
|
||||
|
||||
einfo "You can edit /etc/conf.d/dhcpd to customize dhcp settings."
|
||||
einfo
|
||||
einfo "If you would like to run dhcpd in a chroot, simply configure the"
|
||||
einfo "DHCPD_CHROOT directory in /etc/conf.d/dhcpd and then run:"
|
||||
einfo " emerge --config =${PF}"
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
local CHROOT="$(
|
||||
sed -n -e 's/^[[:blank:]]\?DHCPD_CHROOT="*\([^#"]\+\)"*/\1/p' \
|
||||
"${ROOT}"/etc/conf.d/dhcpd
|
||||
)"
|
||||
|
||||
if [[ -z ${CHROOT} ]]; then
|
||||
eerror "CHROOT not defined in /etc/conf.d/dhcpd"
|
||||
return 1
|
||||
fi
|
||||
|
||||
CHROOT="${ROOT}/${CHROOT}"
|
||||
|
||||
if [[ -d ${CHROOT} ]] ; then
|
||||
ewarn "${CHROOT} already exists - aborting"
|
||||
return 0
|
||||
fi
|
||||
|
||||
ebegin "Setting up the chroot directory"
|
||||
mkdir -m 0755 -p "${CHROOT}/"{dev,etc,var/lib,var/run/dhcp}
|
||||
cp /etc/{localtime,resolv.conf} "${CHROOT}"/etc
|
||||
cp -R /etc/dhcp "${CHROOT}"/etc
|
||||
cp -R /var/lib/dhcp "${CHROOT}"/var/lib
|
||||
ln -s ../../var/lib/dhcp "${CHROOT}"/etc/dhcp/lib
|
||||
chown -R dhcp:dhcp "${CHROOT}"/var/{lib,run}/dhcp
|
||||
eend 0
|
||||
|
||||
local logger="$(best_version virtual/logger)"
|
||||
einfo "To enable logging from the dhcpd server, configure your"
|
||||
einfo "logger (${logger}) to listen on ${CHROOT}/dev/log"
|
||||
}
|
@ -1,226 +0,0 @@
|
||||
# Copyright 1999-2010 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-4.0.1.ebuild,v 1.2 2010/01/15 19:00:22 ulm Exp $
|
||||
|
||||
inherit eutils flag-o-matic autotools
|
||||
|
||||
LDAP_PV="4.0.1-3"
|
||||
|
||||
MY_PV="${PV//_alpha/a}"
|
||||
MY_PV="${MY_PV//_beta/b}"
|
||||
MY_PV="${MY_PV//_rc/rc}"
|
||||
MY_P="${PN}-${MY_PV}"
|
||||
MY_LDAP_PV="${LDAP_PV//-*/}"
|
||||
|
||||
DESCRIPTION="ISC Dynamic Host Configuration Protocol"
|
||||
HOMEPAGE="http://www.isc.org/products/DHCP"
|
||||
SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz
|
||||
ldap? ( http://cloud.github.com/downloads/dcantrell/ldap-for-dhcp/ldap-for-dhcp-${LDAP_PV}.tar.gz
|
||||
http://ftp.disconnected-by-peer.at/pub/ldap-for-dhcp-${LDAP_PV}.tar.gz )"
|
||||
|
||||
LICENSE="as-is BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
|
||||
IUSE="doc ipv6 selinux kernel_linux vim-syntax ldap ssl"
|
||||
|
||||
DEPEND="selinux? ( sec-policy/selinux-dhcp )
|
||||
kernel_linux? ( sys-apps/net-tools )
|
||||
vim-syntax? ( app-vim/dhcpd-syntax )
|
||||
ldap? ( net-nds/openldap
|
||||
ssl? ( dev-libs/openssl ) )"
|
||||
|
||||
PROVIDE="virtual/dhcpc"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
cd "${S}"
|
||||
|
||||
# Gentoo patches - these will probably never be accepted upstream
|
||||
# Enable chroot support
|
||||
epatch "${FILESDIR}/${PN}"-4.0-paranoia.patch
|
||||
# Fix some permission issues
|
||||
epatch "${FILESDIR}/${PN}"-3.0-fix-perms.patch
|
||||
# Enable dhclient to equery NTP servers
|
||||
epatch "${FILESDIR}/${PN}"-4.0-dhclient-ntp.patch
|
||||
# resolvconf support in dhclient-script
|
||||
epatch "${FILESDIR}/${PN}"-4.0-dhclient-resolvconf.patch
|
||||
# Stop downing the interface on Linux as that breaks link daemons
|
||||
# such as wpa_supplicant and netplug
|
||||
epatch "${FILESDIR}/${PN}"-3.1.3-dhclient-no-down-1.patch
|
||||
# Quiet the isc blurb
|
||||
epatch "${FILESDIR}/${PN}"-4.0.2-no_isc_blurb-1.patch
|
||||
# Enable dhclient to get extra configuration from stdin
|
||||
epatch "${FILESDIR}/${PN}"-4.0.1-dhclient-stdin-conf.patch
|
||||
# Disable fallback interfaces when using BPF
|
||||
# This allows more than one dhclient instance on the BSD's
|
||||
epatch "${FILESDIR}/${PN}"-3.0.5-bpf-nofallback.patch
|
||||
# This allows the software to actually compile on linux
|
||||
epatch "${FILESDIR}/${PN}"-4.0-linux-ipv6-header.patch
|
||||
|
||||
# NetworkManager support patches
|
||||
# If they fail to apply to future versions they will be dropped
|
||||
# Add dbus support to dhclient
|
||||
epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-dbus.patch
|
||||
|
||||
# Ldap patch for dhcp
|
||||
epatch "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}/dhcp-${MY_LDAP_PV}"-ldap.patch
|
||||
|
||||
# Brand the version with Gentoo
|
||||
# include revision if >0
|
||||
local newver="Gentoo"
|
||||
[[ ${PR} != "r0" ]] && newver="${newver}-${PR}"
|
||||
|
||||
sed -i "/AC_INIT/s/\(\[[0-9]\+\.[0-9]\+\.[0-9]\+\)/\1-${newver}/" \
|
||||
configure.ac || die
|
||||
|
||||
# Change the hook script locations of the scripts
|
||||
sed -i -e 's,/etc/dhclient-exit-hooks,/etc/dhcp/dhclient-exit-hooks,g' \
|
||||
-e 's,/etc/dhclient-enter-hooks,/etc/dhcp/dhclient-enter-hooks,g' \
|
||||
client/scripts/* || die
|
||||
|
||||
# No need for the linux script to force bash, #158540.
|
||||
sed -i -e 's,#!/bin/bash,#!/bin/sh,' client/scripts/linux || die
|
||||
|
||||
# Quiet the freebsd logger a little
|
||||
sed -i -e '/LOGGER=/ s/-s -p user.notice //g' client/scripts/freebsd || die
|
||||
|
||||
# Remove these options from the sample config
|
||||
sed -i -e "/\(script\|host-name\|domain-name\) / d" \
|
||||
client/dhclient.conf || die
|
||||
|
||||
# Only install different man pages if we don't have en
|
||||
if [[ " ${LINGUAS} " != *" en "* ]]; then
|
||||
# Install Japanese man pages
|
||||
if [[ " ${LINGUAS} " == *" ja "* && -d doc/ja_JP.eucJP ]]; then
|
||||
einfo "Installing Japanese documention"
|
||||
cp doc/ja_JP.eucJP/dhclient* client
|
||||
cp doc/ja_JP.eucJP/dhcp* common
|
||||
fi
|
||||
fi
|
||||
|
||||
# Now remove the non-english docs so there are no errors later
|
||||
[[ -d doc/ja_JP.eucJP ]] && rm -rf doc/ja_JP.eucJP
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
econf \
|
||||
--enable-paranoia \
|
||||
--sysconfdir /etc/dhcp \
|
||||
--with-cli-pid-file=/var/run/dhcp/dhclient.pid \
|
||||
--with-cli-lease-file=/var/lib/dhcp/dhclient.leases \
|
||||
--with-srv-pid-file=/var/run/dhcp/dhcpd.pid \
|
||||
--with-srv-lease-file=/var/lib/dhcp/dhcpd.leases \
|
||||
--with-relay-pid-file=/var/run/dhcp/dhcrelay.pid \
|
||||
$(use_enable ipv6 dhcpv6) \
|
||||
$(use_with ldap) \
|
||||
$(use_with ssl ldapcrypto) \
|
||||
|| die
|
||||
|
||||
emake || die "compile problem"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
for installdir in includes tests common minires dst omapip client dhcpctl relay server; do
|
||||
cd "${S}/${installdir}"
|
||||
if [ "${installdir}" == client ]; then
|
||||
make install DESTDIR="${D}" exec_prefix="" || die
|
||||
else
|
||||
make install DESTDIR="${D}" exec_prefix="/usr" || die
|
||||
fi
|
||||
done
|
||||
|
||||
cd "${S}"
|
||||
|
||||
exeinto /sbin
|
||||
if use kernel_linux; then
|
||||
newexe "${S}"/client/scripts/linux dhclient-script
|
||||
else
|
||||
newexe "${S}"/client/scripts/freebsd dhclient-script
|
||||
fi
|
||||
|
||||
if use doc; then
|
||||
dodoc README RELNOTES doc/*
|
||||
use ldap && dodoc "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/*.ldap "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/draft-ietf-dhc-ldap-schema-01.txt
|
||||
fi
|
||||
insinto /etc/dhcp
|
||||
newins client/dhclient.conf dhclient.conf.sample
|
||||
keepdir /var/{lib,run}/dhcp
|
||||
|
||||
# Install our server files
|
||||
insinto /etc/dhcp
|
||||
newins server/dhcpd.conf dhcpd.conf.sample
|
||||
newinitd "${FILESDIR}"/dhcpd.init dhcpd
|
||||
newinitd "${FILESDIR}"/dhcrelay.init dhcrelay
|
||||
newconfd "${FILESDIR}"/dhcpd.conf dhcpd
|
||||
newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay
|
||||
|
||||
# install ldap files
|
||||
if use ldap; then
|
||||
insinto /etc/openldap/schema
|
||||
doins "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/dhcp.*
|
||||
dosbin "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/dhcpd-conf-to-ldap
|
||||
fi
|
||||
|
||||
|
||||
# We never want portage to own this file
|
||||
rm -f "${D}"/var/lib/dhcp/dhcpd.leases
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
enewgroup dhcp
|
||||
enewuser dhcp -1 -1 /var/lib/dhcp dhcp
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
chown dhcp:dhcp "${ROOT}"/var/{lib,run}/dhcp
|
||||
|
||||
if [[ -e "${ROOT}"/etc/init.d/dhcp ]] ; then
|
||||
ewarn
|
||||
ewarn "WARNING: The dhcp init script has been renamed to dhcpd"
|
||||
ewarn "/etc/init.d/dhcp and /etc/conf.d/dhcp need to be removed and"
|
||||
ewarn "and dhcp should be removed from the default runlevel"
|
||||
ewarn
|
||||
fi
|
||||
|
||||
einfo "You can edit /etc/conf.d/dhcpd to customize dhcp settings."
|
||||
einfo
|
||||
einfo "If you would like to run dhcpd in a chroot, simply configure the"
|
||||
einfo "DHCPD_CHROOT directory in /etc/conf.d/dhcpd and then run:"
|
||||
einfo " emerge --config =${PF}"
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
local CHROOT="$(
|
||||
sed -n -e 's/^[[:blank:]]\?DHCPD_CHROOT="*\([^#"]\+\)"*/\1/p' \
|
||||
"${ROOT}"/etc/conf.d/dhcpd
|
||||
)"
|
||||
|
||||
if [[ -z ${CHROOT} ]]; then
|
||||
eerror "CHROOT not defined in /etc/conf.d/dhcpd"
|
||||
return 1
|
||||
fi
|
||||
|
||||
CHROOT="${ROOT}/${CHROOT}"
|
||||
|
||||
if [[ -d ${CHROOT} ]] ; then
|
||||
ewarn "${CHROOT} already exists - aborting"
|
||||
return 0
|
||||
fi
|
||||
|
||||
ebegin "Setting up the chroot directory"
|
||||
mkdir -m 0755 -p "${CHROOT}/"{dev,etc,var/lib,var/run/dhcp}
|
||||
cp /etc/{localtime,resolv.conf} "${CHROOT}"/etc
|
||||
cp -R /etc/dhcp "${CHROOT}"/etc
|
||||
cp -R /var/lib/dhcp "${CHROOT}"/var/lib
|
||||
ln -s ../../var/lib/dhcp "${CHROOT}"/etc/dhcp/lib
|
||||
chown -R dhcp:dhcp "${CHROOT}"/var/{lib,run}/dhcp
|
||||
eend 0
|
||||
|
||||
local logger="$(best_version virtual/logger)"
|
||||
einfo "To enable logging from the dhcpd server, configure your"
|
||||
einfo "logger (${logger}) to listen on ${CHROOT}/dev/log"
|
||||
}
|
@ -1,234 +0,0 @@
|
||||
# Copyright 1999-2010 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-4.1.0.ebuild,v 1.2 2010/01/15 19:00:22 ulm Exp $
|
||||
|
||||
inherit eutils flag-o-matic autotools
|
||||
|
||||
LDAP_PV="4.1.0-5"
|
||||
|
||||
MY_PV="${PV//_alpha/a}"
|
||||
MY_PV="${MY_PV//_beta/b}"
|
||||
MY_PV="${MY_PV//_rc/rc}"
|
||||
MY_P="${PN}-${MY_PV}"
|
||||
MY_LDAP_PV="${LDAP_PV//-*/}"
|
||||
|
||||
DESCRIPTION="ISC Dynamic Host Configuration Protocol"
|
||||
HOMEPAGE="http://www.isc.org/products/DHCP"
|
||||
SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz
|
||||
ldap? ( http://cloud.github.com/downloads/dcantrell/ldap-for-dhcp/ldap-for-dhcp-${LDAP_PV}.tar.gz
|
||||
http://ftp.disconnected-by-peer.at/pub/ldap-for-dhcp-${LDAP_PV}.tar.gz )"
|
||||
|
||||
LICENSE="as-is BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
|
||||
IUSE="doc ipv6 selinux kernel_linux vim-syntax ldap ssl"
|
||||
|
||||
DEPEND="selinux? ( sec-policy/selinux-dhcp )
|
||||
kernel_linux? ( sys-apps/net-tools )
|
||||
vim-syntax? ( app-vim/dhcpd-syntax )
|
||||
ldap? ( net-nds/openldap
|
||||
ssl? ( dev-libs/openssl ) )"
|
||||
|
||||
PROVIDE="virtual/dhcpc"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
cd "${S}"
|
||||
|
||||
# Gentoo patches - these will probably never be accepted upstream
|
||||
# Fix some permission issues
|
||||
epatch "${FILESDIR}/${PN}"-3.0-fix-perms.patch
|
||||
# Enable dhclient to equery NTP servers
|
||||
epatch "${FILESDIR}/${PN}"-4.0-dhclient-ntp.patch
|
||||
# resolvconf support in dhclient-script
|
||||
epatch "${FILESDIR}/${PN}"-4.0-dhclient-resolvconf.patch
|
||||
# Fix setting hostnames on Linux
|
||||
epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-hostname.patch
|
||||
# Allow mtu settings
|
||||
epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-mtu.patch
|
||||
# Allow dhclient to use IF_METRIC to set route metrics
|
||||
epatch "${FILESDIR}/${PN}"-4.1-dhclient-metric.patch
|
||||
# Stop downing the interface on Linux as that breaks link daemons
|
||||
# such as wpa_supplicant and netplug
|
||||
epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-no-down.patch
|
||||
# Quiet the isc blurb
|
||||
epatch "${FILESDIR}/${PN}"-4.1-no_isc_blurb.patch
|
||||
# Enable dhclient to get extra configuration from stdin
|
||||
epatch "${FILESDIR}/${PN}"-4.0.1-dhclient-stdin-conf.patch
|
||||
# Disable fallback interfaces when using BPF
|
||||
# This allows more than one dhclient instance on the BSD's
|
||||
epatch "${FILESDIR}/${PN}"-3.0.5-bpf-nofallback.patch
|
||||
# This allows the software to actually compile on linux
|
||||
epatch "${FILESDIR}/${PN}"-4.0-linux-ipv6-header.patch
|
||||
# Consistent style for the if statements, also resolves
|
||||
# unary operator expected warnings (new style is wrong).
|
||||
epatch "${FILESDIR}/${PN}"-4.0-dhclient-script-correct-operators.patch
|
||||
|
||||
# NetworkManager support patches
|
||||
# If they fail to apply to future versions they will be dropped
|
||||
# Add dbus support to dhclient
|
||||
epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-dbus.patch
|
||||
|
||||
# Ldap patch for dhcp
|
||||
epatch "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}/dhcp-${MY_LDAP_PV}"-ldap.patch
|
||||
|
||||
# Brand the version with Gentoo
|
||||
# include revision if >0
|
||||
local newver="Gentoo"
|
||||
[[ ${PR} != "r0" ]] && newver="${newver}-${PR}"
|
||||
|
||||
sed -i "/AC_INIT/s/\(\[[0-9]\+\.[0-9]\+\.[0-9]\+\)/\1-${newver}/" \
|
||||
configure.ac || die
|
||||
|
||||
# Change the hook script locations of the scripts
|
||||
sed -i -e 's,/etc/dhclient-exit-hooks,/etc/dhcp/dhclient-exit-hooks,g' \
|
||||
-e 's,/etc/dhclient-enter-hooks,/etc/dhcp/dhclient-enter-hooks,g' \
|
||||
client/scripts/* || die
|
||||
|
||||
# No need for the linux script to force bash, #158540.
|
||||
sed -i -e 's,#!/bin/bash,#!/bin/sh,' client/scripts/linux || die
|
||||
|
||||
# Quiet the freebsd logger a little
|
||||
sed -i -e '/LOGGER=/ s/-s -p user.notice //g' client/scripts/freebsd || die
|
||||
|
||||
# Remove these options from the sample config
|
||||
sed -i -e "/\(script\|host-name\|domain-name\) / d" \
|
||||
client/dhclient.conf || die
|
||||
|
||||
# Only install different man pages if we don't have en
|
||||
if [[ " ${LINGUAS} " != *" en "* ]]; then
|
||||
# Install Japanese man pages
|
||||
if [[ " ${LINGUAS} " == *" ja "* && -d doc/ja_JP.eucJP ]]; then
|
||||
einfo "Installing Japanese documention"
|
||||
cp doc/ja_JP.eucJP/dhclient* client
|
||||
cp doc/ja_JP.eucJP/dhcp* common
|
||||
fi
|
||||
fi
|
||||
|
||||
# Now remove the non-english docs so there are no errors later
|
||||
[[ -d doc/ja_JP.eucJP ]] && rm -rf doc/ja_JP.eucJP
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
econf \
|
||||
--enable-paranoia \
|
||||
--sysconfdir /etc/dhcp \
|
||||
--with-cli-pid-file=/var/run/dhcp/dhclient.pid \
|
||||
--with-cli-lease-file=/var/lib/dhcp/dhclient.leases \
|
||||
--with-srv-pid-file=/var/run/dhcp/dhcpd.pid \
|
||||
--with-srv-lease-file=/var/lib/dhcp/dhcpd.leases \
|
||||
--with-relay-pid-file=/var/run/dhcp/dhcrelay.pid \
|
||||
$(use_enable ipv6 dhcpv6) \
|
||||
$(use_with ldap) \
|
||||
$(use_with ssl ldapcrypto) \
|
||||
|| die
|
||||
|
||||
emake || die "compile problem"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
for installdir in includes tests common minires dst omapip client dhcpctl relay server; do
|
||||
cd "${S}/${installdir}"
|
||||
if [ "${installdir}" == client ]; then
|
||||
make install DESTDIR="${D}" exec_prefix="" || die
|
||||
else
|
||||
make install DESTDIR="${D}" exec_prefix="/usr" || die
|
||||
fi
|
||||
done
|
||||
|
||||
cd "${S}"
|
||||
|
||||
exeinto /sbin
|
||||
if use kernel_linux; then
|
||||
newexe "${S}"/client/scripts/linux dhclient-script
|
||||
else
|
||||
newexe "${S}"/client/scripts/freebsd dhclient-script
|
||||
fi
|
||||
|
||||
if use doc; then
|
||||
dodoc README RELNOTES doc/*
|
||||
use ldap && dodoc "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/*.ldap "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/draft-ietf-dhc-ldap-schema-01.txt
|
||||
fi
|
||||
insinto /etc/dhcp
|
||||
newins client/dhclient.conf dhclient.conf.sample
|
||||
keepdir /var/{lib,run}/dhcp
|
||||
keepdir /var/lib/dhclient
|
||||
|
||||
# Install our server files
|
||||
insinto /etc/dhcp
|
||||
newins server/dhcpd.conf dhcpd.conf.sample
|
||||
newinitd "${FILESDIR}"/dhcpd.init2 dhcpd
|
||||
newinitd "${FILESDIR}"/dhcrelay.init dhcrelay
|
||||
newconfd "${FILESDIR}"/dhcpd.conf dhcpd
|
||||
newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay
|
||||
|
||||
# install ldap files
|
||||
if use ldap; then
|
||||
insinto /etc/openldap/schema
|
||||
doins "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/dhcp.*
|
||||
dosbin "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/dhcpd-conf-to-ldap
|
||||
fi
|
||||
|
||||
|
||||
# We never want portage to own this file
|
||||
rm -f "${D}"/var/lib/dhcp/dhcpd.leases
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
enewgroup dhcp
|
||||
enewuser dhcp -1 -1 /var/lib/dhcp dhcp
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
chown -R dhcp:dhcp "${ROOT}"/var/{lib,run}/dhcp
|
||||
|
||||
if [[ -e "${ROOT}"/etc/init.d/dhcp ]] ; then
|
||||
ewarn
|
||||
ewarn "WARNING: The dhcp init script has been renamed to dhcpd"
|
||||
ewarn "/etc/init.d/dhcp and /etc/conf.d/dhcp need to be removed and"
|
||||
ewarn "and dhcp should be removed from the default runlevel"
|
||||
ewarn
|
||||
fi
|
||||
|
||||
einfo "You can edit /etc/conf.d/dhcpd to customize dhcp settings."
|
||||
einfo
|
||||
einfo "If you would like to run dhcpd in a chroot, simply configure the"
|
||||
einfo "DHCPD_CHROOT directory in /etc/conf.d/dhcpd and then run:"
|
||||
einfo " emerge --config =${PF}"
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
local CHROOT="$(
|
||||
sed -n -e 's/^[[:blank:]]\?DHCPD_CHROOT="*\([^#"]\+\)"*/\1/p' \
|
||||
"${ROOT}"/etc/conf.d/dhcpd
|
||||
)"
|
||||
|
||||
if [[ -z ${CHROOT} ]]; then
|
||||
eerror "CHROOT not defined in /etc/conf.d/dhcpd"
|
||||
return 1
|
||||
fi
|
||||
|
||||
CHROOT="${ROOT}/${CHROOT}"
|
||||
|
||||
if [[ -d ${CHROOT} ]] ; then
|
||||
ewarn "${CHROOT} already exists - aborting"
|
||||
return 0
|
||||
fi
|
||||
|
||||
ebegin "Setting up the chroot directory"
|
||||
mkdir -m 0755 -p "${CHROOT}/"{dev,etc,var/lib,var/run/dhcp}
|
||||
cp /etc/{localtime,resolv.conf} "${CHROOT}"/etc
|
||||
cp -R /etc/dhcp "${CHROOT}"/etc
|
||||
cp -R /var/lib/dhcp "${CHROOT}"/var/lib
|
||||
ln -s ../../var/lib/dhcp "${CHROOT}"/etc/dhcp/lib
|
||||
chown -R dhcp:dhcp "${CHROOT}"/var/{lib,run}/dhcp
|
||||
eend 0
|
||||
|
||||
local logger="$(best_version virtual/logger)"
|
||||
einfo "To enable logging from the dhcpd server, configure your"
|
||||
einfo "logger (${logger}) to listen on ${CHROOT}/dev/log"
|
||||
}
|
@ -1,225 +0,0 @@
|
||||
# Copyright 1999-2010 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-4.1.0.ebuild,v 1.2 2010/01/15 19:00:22 ulm Exp $
|
||||
|
||||
inherit eutils flag-o-matic autotools
|
||||
|
||||
LDAP_PV="4.1.1-1"
|
||||
|
||||
MY_PV="${PV//_alpha/a}"
|
||||
MY_PV="${MY_PV//_beta/b}"
|
||||
MY_PV="${MY_PV//_rc/rc}"
|
||||
MY_P="${PN}-${MY_PV}"
|
||||
MY_LDAP_PV="${LDAP_PV//-*/}"
|
||||
|
||||
DESCRIPTION="ISC Dynamic Host Configuration Protocol"
|
||||
HOMEPAGE="http://www.isc.org/products/DHCP"
|
||||
SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz
|
||||
ldap? ( http://cloud.github.com/downloads/dcantrell/ldap-for-dhcp/ldap-for-dhcp-${LDAP_PV}.tar.gz
|
||||
http://ftp.disconnected-by-peer.at/pub/ldap-for-dhcp-${LDAP_PV}.tar.gz )"
|
||||
|
||||
LICENSE="as-is BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
|
||||
IUSE="doc ipv6 selinux kernel_linux vim-syntax ldap ssl"
|
||||
|
||||
DEPEND="selinux? ( sec-policy/selinux-dhcp )
|
||||
kernel_linux? ( sys-apps/net-tools )
|
||||
vim-syntax? ( app-vim/dhcpd-syntax )
|
||||
ldap? ( net-nds/openldap
|
||||
ssl? ( dev-libs/openssl ) )"
|
||||
|
||||
PROVIDE="virtual/dhcpc"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
cd "${S}"
|
||||
|
||||
# Gentoo patches - these will probably never be accepted upstream
|
||||
# Fix some permission issues
|
||||
epatch "${FILESDIR}/${PN}"-3.0-fix-perms.patch
|
||||
# Enable dhclient to equery NTP servers
|
||||
epatch "${FILESDIR}/${PN}"-4.0-dhclient-ntp.patch
|
||||
# resolvconf support in dhclient-script
|
||||
epatch "${FILESDIR}/${PN}"-4.0-dhclient-resolvconf.patch
|
||||
# Stop downing the interface on Linux as that breaks link daemons
|
||||
# such as wpa_supplicant and netplug
|
||||
epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-no-down.patch
|
||||
# Quiet the isc blurb
|
||||
epatch "${FILESDIR}/${PN}"-4.1.1-no_isc_blurb-1.patch
|
||||
# Enable dhclient to get extra configuration from stdin
|
||||
epatch "${FILESDIR}/${PN}"-4.0.1-dhclient-stdin-conf.patch
|
||||
# Disable fallback interfaces when using BPF
|
||||
# This allows more than one dhclient instance on the BSD's
|
||||
epatch "${FILESDIR}/${PN}"-3.0.5-bpf-nofallback.patch
|
||||
# This allows the software to actually compile on linux
|
||||
epatch "${FILESDIR}/${PN}"-4.0-linux-ipv6-header.patch
|
||||
|
||||
# NetworkManager support patches
|
||||
# If they fail to apply to future versions they will be dropped
|
||||
# Add dbus support to dhclient
|
||||
epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-dbus.patch
|
||||
|
||||
# Ldap patch for dhcp
|
||||
epatch "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}/dhcp-${MY_LDAP_PV}"-ldap.patch
|
||||
|
||||
# Brand the version with Gentoo
|
||||
# include revision if >0
|
||||
local newver="Gentoo"
|
||||
[[ ${PR} != "r0" ]] && newver="${newver}-${PR}"
|
||||
|
||||
sed -i "/AC_INIT/s/\(\[[0-9]\+\.[0-9]\+\.[0-9]\+\)/\1-${newver}/" \
|
||||
configure.ac || die
|
||||
|
||||
# Change the hook script locations of the scripts
|
||||
sed -i -e 's,/etc/dhclient-exit-hooks,/etc/dhcp/dhclient-exit-hooks,g' \
|
||||
-e 's,/etc/dhclient-enter-hooks,/etc/dhcp/dhclient-enter-hooks,g' \
|
||||
client/scripts/* || die
|
||||
|
||||
# No need for the linux script to force bash, #158540.
|
||||
sed -i -e 's,#!/bin/bash,#!/bin/sh,' client/scripts/linux || die
|
||||
|
||||
# Quiet the freebsd logger a little
|
||||
sed -i -e '/LOGGER=/ s/-s -p user.notice //g' client/scripts/freebsd || die
|
||||
|
||||
# Remove these options from the sample config
|
||||
sed -i -e "/\(script\|host-name\|domain-name\) / d" \
|
||||
client/dhclient.conf || die
|
||||
|
||||
# Only install different man pages if we don't have en
|
||||
if [[ " ${LINGUAS} " != *" en "* ]]; then
|
||||
# Install Japanese man pages
|
||||
if [[ " ${LINGUAS} " == *" ja "* && -d doc/ja_JP.eucJP ]]; then
|
||||
einfo "Installing Japanese documention"
|
||||
cp doc/ja_JP.eucJP/dhclient* client
|
||||
cp doc/ja_JP.eucJP/dhcp* common
|
||||
fi
|
||||
fi
|
||||
|
||||
# Now remove the non-english docs so there are no errors later
|
||||
[[ -d doc/ja_JP.eucJP ]] && rm -rf doc/ja_JP.eucJP
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
econf \
|
||||
--enable-paranoia \
|
||||
--sysconfdir /etc/dhcp \
|
||||
--with-cli-pid-file=/var/run/dhcp/dhclient.pid \
|
||||
--with-cli-lease-file=/var/lib/dhcp/dhclient.leases \
|
||||
--with-srv-pid-file=/var/run/dhcp/dhcpd.pid \
|
||||
--with-srv-lease-file=/var/lib/dhcp/dhcpd.leases \
|
||||
--with-relay-pid-file=/var/run/dhcp/dhcrelay.pid \
|
||||
$(use_enable ipv6 dhcpv6) \
|
||||
$(use_with ldap) \
|
||||
$(use_with ssl ldapcrypto) \
|
||||
|| die
|
||||
|
||||
emake || die "compile problem"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
for installdir in includes tests common minires dst omapip client dhcpctl relay server; do
|
||||
cd "${S}/${installdir}"
|
||||
if [ "${installdir}" == client ]; then
|
||||
make install DESTDIR="${D}" exec_prefix="" || die
|
||||
else
|
||||
make install DESTDIR="${D}" exec_prefix="/usr" || die
|
||||
fi
|
||||
done
|
||||
|
||||
cd "${S}"
|
||||
|
||||
exeinto /sbin
|
||||
if use kernel_linux; then
|
||||
newexe "${S}"/client/scripts/linux dhclient-script
|
||||
else
|
||||
newexe "${S}"/client/scripts/freebsd dhclient-script
|
||||
fi
|
||||
|
||||
if use doc; then
|
||||
dodoc README RELNOTES doc/*
|
||||
use ldap && dodoc "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/*.ldap "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/draft-ietf-dhc-ldap-schema-01.txt
|
||||
fi
|
||||
insinto /etc/dhcp
|
||||
newins client/dhclient.conf dhclient.conf.sample
|
||||
keepdir /var/{lib,run}/dhcp
|
||||
keepdir /var/lib/dhclient
|
||||
|
||||
# Install our server files
|
||||
insinto /etc/dhcp
|
||||
newins server/dhcpd.conf dhcpd.conf.sample
|
||||
newinitd "${FILESDIR}"/dhcpd.init2 dhcpd
|
||||
newinitd "${FILESDIR}"/dhcrelay.init dhcrelay
|
||||
newconfd "${FILESDIR}"/dhcpd.conf dhcpd
|
||||
newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay
|
||||
|
||||
# install ldap files
|
||||
if use ldap; then
|
||||
insinto /etc/openldap/schema
|
||||
doins "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/dhcp.*
|
||||
dosbin "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/dhcpd-conf-to-ldap
|
||||
fi
|
||||
|
||||
|
||||
# We never want portage to own this file
|
||||
rm -f "${D}"/var/lib/dhcp/dhcpd.leases
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
enewgroup dhcp
|
||||
enewuser dhcp -1 -1 /var/lib/dhcp dhcp
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
chown -R dhcp:dhcp "${ROOT}"/var/{lib,run}/dhcp
|
||||
|
||||
if [[ -e "${ROOT}"/etc/init.d/dhcp ]] ; then
|
||||
ewarn
|
||||
ewarn "WARNING: The dhcp init script has been renamed to dhcpd"
|
||||
ewarn "/etc/init.d/dhcp and /etc/conf.d/dhcp need to be removed and"
|
||||
ewarn "and dhcp should be removed from the default runlevel"
|
||||
ewarn
|
||||
fi
|
||||
|
||||
einfo "You can edit /etc/conf.d/dhcpd to customize dhcp settings."
|
||||
einfo
|
||||
einfo "If you would like to run dhcpd in a chroot, simply configure the"
|
||||
einfo "DHCPD_CHROOT directory in /etc/conf.d/dhcpd and then run:"
|
||||
einfo " emerge --config =${PF}"
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
local CHROOT="$(
|
||||
sed -n -e 's/^[[:blank:]]\?DHCPD_CHROOT="*\([^#"]\+\)"*/\1/p' \
|
||||
"${ROOT}"/etc/conf.d/dhcpd
|
||||
)"
|
||||
|
||||
if [[ -z ${CHROOT} ]]; then
|
||||
eerror "CHROOT not defined in /etc/conf.d/dhcpd"
|
||||
return 1
|
||||
fi
|
||||
|
||||
CHROOT="${ROOT}/${CHROOT}"
|
||||
|
||||
if [[ -d ${CHROOT} ]] ; then
|
||||
ewarn "${CHROOT} already exists - aborting"
|
||||
return 0
|
||||
fi
|
||||
|
||||
ebegin "Setting up the chroot directory"
|
||||
mkdir -m 0755 -p "${CHROOT}/"{dev,etc,var/lib,var/run/dhcp}
|
||||
cp /etc/{localtime,resolv.conf} "${CHROOT}"/etc
|
||||
cp -R /etc/dhcp "${CHROOT}"/etc
|
||||
cp -R /var/lib/dhcp "${CHROOT}"/var/lib
|
||||
ln -s ../../var/lib/dhcp "${CHROOT}"/etc/dhcp/lib
|
||||
chown -R dhcp:dhcp "${CHROOT}"/var/{lib,run}/dhcp
|
||||
eend 0
|
||||
|
||||
local logger="$(best_version virtual/logger)"
|
||||
einfo "To enable logging from the dhcpd server, configure your"
|
||||
einfo "logger (${logger}) to listen on ${CHROOT}/dev/log"
|
||||
}
|
@ -1,225 +0,0 @@
|
||||
# Copyright 1999-2010 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-4.1.0.ebuild,v 1.2 2010/01/15 19:00:22 ulm Exp $
|
||||
|
||||
inherit eutils flag-o-matic autotools
|
||||
|
||||
LDAP_PV="4.1.1-2"
|
||||
|
||||
MY_PV="${PV//_alpha/a}"
|
||||
MY_PV="${MY_PV//_beta/b}"
|
||||
MY_PV="${MY_PV//_rc/rc}"
|
||||
MY_PV="${MY_PV//_p/-P}"
|
||||
MY_P="${PN}-${MY_PV}"
|
||||
MY_LDAP_PV="${LDAP_PV//-*/}"
|
||||
|
||||
DESCRIPTION="ISC Dynamic Host Configuration Protocol"
|
||||
HOMEPAGE="http://www.isc.org/products/DHCP"
|
||||
SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz
|
||||
http://cloud.github.com/downloads/dcantrell/ldap-for-dhcp/ldap-for-dhcp-${LDAP_PV}.tar.gz"
|
||||
|
||||
LICENSE="as-is BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
|
||||
IUSE="doc ipv6 selinux kernel_linux vim-syntax ldap ssl"
|
||||
|
||||
DEPEND="selinux? ( sec-policy/selinux-dhcp )
|
||||
kernel_linux? ( sys-apps/net-tools )
|
||||
vim-syntax? ( app-vim/dhcpd-syntax )
|
||||
ldap? ( net-nds/openldap
|
||||
ssl? ( dev-libs/openssl ) )"
|
||||
|
||||
PROVIDE="virtual/dhcpc"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
cd "${S}"
|
||||
|
||||
# Gentoo patches - these will probably never be accepted upstream
|
||||
# Fix some permission issues
|
||||
epatch "${FILESDIR}/${PN}"-3.0-fix-perms.patch
|
||||
# Enable dhclient to equery NTP servers
|
||||
epatch "${FILESDIR}/${PN}"-4.0-dhclient-ntp.patch
|
||||
# resolvconf support in dhclient-script
|
||||
epatch "${FILESDIR}/${PN}"-4.0-dhclient-resolvconf.patch
|
||||
# Stop downing the interface on Linux as that breaks link daemons
|
||||
# such as wpa_supplicant and netplug
|
||||
epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-no-down.patch
|
||||
# Quiet the isc blurb
|
||||
epatch "${FILESDIR}/${PN}"-4.1.1-no_isc_blurb-1.patch
|
||||
# Enable dhclient to get extra configuration from stdin
|
||||
epatch "${FILESDIR}/${PN}"-4.0.1-dhclient-stdin-conf.patch
|
||||
# Disable fallback interfaces when using BPF
|
||||
# This allows more than one dhclient instance on the BSD's
|
||||
epatch "${FILESDIR}/${PN}"-3.0.5-bpf-nofallback.patch
|
||||
# This allows the software to actually compile on linux
|
||||
epatch "${FILESDIR}/${PN}"-4.0-linux-ipv6-header.patch
|
||||
|
||||
# NetworkManager support patches
|
||||
# If they fail to apply to future versions they will be dropped
|
||||
# Add dbus support to dhclient
|
||||
epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-dbus.patch
|
||||
|
||||
# Ldap patch for dhcp
|
||||
epatch "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}/dhcp-${MY_LDAP_PV}"-ldap.patch
|
||||
|
||||
# Brand the version with Gentoo
|
||||
# include revision if >0
|
||||
local newver="Gentoo"
|
||||
[[ ${PR} != "r0" ]] && newver="${newver}-${PR}"
|
||||
|
||||
sed -i "/AC_INIT/s/\(\[[0-9]\+\.[0-9]\+\.[0-9]\+\)/\1-${newver}/" \
|
||||
configure.ac || die
|
||||
|
||||
# Change the hook script locations of the scripts
|
||||
sed -i -e 's,/etc/dhclient-exit-hooks,/etc/dhcp/dhclient-exit-hooks,g' \
|
||||
-e 's,/etc/dhclient-enter-hooks,/etc/dhcp/dhclient-enter-hooks,g' \
|
||||
client/scripts/* || die
|
||||
|
||||
# No need for the linux script to force bash, #158540.
|
||||
sed -i -e 's,#!/bin/bash,#!/bin/sh,' client/scripts/linux || die
|
||||
|
||||
# Quiet the freebsd logger a little
|
||||
sed -i -e '/LOGGER=/ s/-s -p user.notice //g' client/scripts/freebsd || die
|
||||
|
||||
# Remove these options from the sample config
|
||||
sed -i -e "/\(script\|host-name\|domain-name\) / d" \
|
||||
client/dhclient.conf || die
|
||||
|
||||
# Only install different man pages if we don't have en
|
||||
if [[ " ${LINGUAS} " != *" en "* ]]; then
|
||||
# Install Japanese man pages
|
||||
if [[ " ${LINGUAS} " == *" ja "* && -d doc/ja_JP.eucJP ]]; then
|
||||
einfo "Installing Japanese documention"
|
||||
cp doc/ja_JP.eucJP/dhclient* client
|
||||
cp doc/ja_JP.eucJP/dhcp* common
|
||||
fi
|
||||
fi
|
||||
|
||||
# Now remove the non-english docs so there are no errors later
|
||||
[[ -d doc/ja_JP.eucJP ]] && rm -rf doc/ja_JP.eucJP
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
econf \
|
||||
--enable-paranoia \
|
||||
--sysconfdir /etc/dhcp \
|
||||
--with-cli-pid-file=/var/run/dhcp/dhclient.pid \
|
||||
--with-cli-lease-file=/var/lib/dhcp/dhclient.leases \
|
||||
--with-srv-pid-file=/var/run/dhcp/dhcpd.pid \
|
||||
--with-srv-lease-file=/var/lib/dhcp/dhcpd.leases \
|
||||
--with-relay-pid-file=/var/run/dhcp/dhcrelay.pid \
|
||||
$(use_enable ipv6 dhcpv6) \
|
||||
$(use_with ldap) \
|
||||
$(use_with ssl ldapcrypto) \
|
||||
|| die
|
||||
|
||||
emake || die "compile problem"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
for installdir in includes tests common minires dst omapip client dhcpctl relay server; do
|
||||
cd "${S}/${installdir}"
|
||||
if [ "${installdir}" == client ]; then
|
||||
make install DESTDIR="${D}" exec_prefix="" || die
|
||||
else
|
||||
make install DESTDIR="${D}" exec_prefix="/usr" || die
|
||||
fi
|
||||
done
|
||||
|
||||
cd "${S}"
|
||||
|
||||
exeinto /sbin
|
||||
if use kernel_linux; then
|
||||
newexe "${S}"/client/scripts/linux dhclient-script
|
||||
else
|
||||
newexe "${S}"/client/scripts/freebsd dhclient-script
|
||||
fi
|
||||
|
||||
if use doc; then
|
||||
dodoc README RELNOTES doc/*
|
||||
use ldap && dodoc "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/*.ldap "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/draft-ietf-dhc-ldap-schema-01.txt
|
||||
fi
|
||||
insinto /etc/dhcp
|
||||
newins client/dhclient.conf dhclient.conf.sample
|
||||
keepdir /var/{lib,run}/dhcp
|
||||
keepdir /var/lib/dhclient
|
||||
|
||||
# Install our server files
|
||||
insinto /etc/dhcp
|
||||
newins server/dhcpd.conf dhcpd.conf.sample
|
||||
newinitd "${FILESDIR}"/dhcpd.init2 dhcpd
|
||||
newinitd "${FILESDIR}"/dhcrelay.init dhcrelay
|
||||
newconfd "${FILESDIR}"/dhcpd.conf dhcpd
|
||||
newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay
|
||||
|
||||
# install ldap files
|
||||
if use ldap; then
|
||||
insinto /etc/openldap/schema
|
||||
doins "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/dhcp.*
|
||||
dosbin "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/dhcpd-conf-to-ldap
|
||||
fi
|
||||
|
||||
|
||||
# We never want portage to own this file
|
||||
rm -f "${D}"/var/lib/dhcp/dhcpd.leases
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
enewgroup dhcp
|
||||
enewuser dhcp -1 -1 /var/lib/dhcp dhcp
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
chown -R dhcp:dhcp "${ROOT}"/var/{lib,run}/dhcp
|
||||
|
||||
if [[ -e "${ROOT}"/etc/init.d/dhcp ]] ; then
|
||||
ewarn
|
||||
ewarn "WARNING: The dhcp init script has been renamed to dhcpd"
|
||||
ewarn "/etc/init.d/dhcp and /etc/conf.d/dhcp need to be removed and"
|
||||
ewarn "and dhcp should be removed from the default runlevel"
|
||||
ewarn
|
||||
fi
|
||||
|
||||
einfo "You can edit /etc/conf.d/dhcpd to customize dhcp settings."
|
||||
einfo
|
||||
einfo "If you would like to run dhcpd in a chroot, simply configure the"
|
||||
einfo "DHCPD_CHROOT directory in /etc/conf.d/dhcpd and then run:"
|
||||
einfo " emerge --config =${PF}"
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
local CHROOT="$(
|
||||
sed -n -e 's/^[[:blank:]]\?DHCPD_CHROOT="*\([^#"]\+\)"*/\1/p' \
|
||||
"${ROOT}"/etc/conf.d/dhcpd
|
||||
)"
|
||||
|
||||
if [[ -z ${CHROOT} ]]; then
|
||||
eerror "CHROOT not defined in /etc/conf.d/dhcpd"
|
||||
return 1
|
||||
fi
|
||||
|
||||
CHROOT="${ROOT}/${CHROOT}"
|
||||
|
||||
if [[ -d ${CHROOT} ]] ; then
|
||||
ewarn "${CHROOT} already exists - aborting"
|
||||
return 0
|
||||
fi
|
||||
|
||||
ebegin "Setting up the chroot directory"
|
||||
mkdir -m 0755 -p "${CHROOT}/"{dev,etc,var/lib,var/run/dhcp}
|
||||
cp /etc/{localtime,resolv.conf} "${CHROOT}"/etc
|
||||
cp -R /etc/dhcp "${CHROOT}"/etc
|
||||
cp -R /var/lib/dhcp "${CHROOT}"/var/lib
|
||||
ln -s ../../var/lib/dhcp "${CHROOT}"/etc/dhcp/lib
|
||||
chown -R dhcp:dhcp "${CHROOT}"/var/{lib,run}/dhcp
|
||||
eend 0
|
||||
|
||||
local logger="$(best_version virtual/logger)"
|
||||
einfo "To enable logging from the dhcpd server, configure your"
|
||||
einfo "logger (${logger}) to listen on ${CHROOT}/dev/log"
|
||||
}
|
@ -1,223 +0,0 @@
|
||||
# Copyright 1999-2010 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-4.1.0.ebuild,v 1.2 2010/01/15 19:00:22 ulm Exp $
|
||||
|
||||
inherit eutils flag-o-matic autotools
|
||||
|
||||
LDAP_PV="4.1.1-2"
|
||||
|
||||
MY_PV="${PV//_alpha/a}"
|
||||
MY_PV="${MY_PV//_beta/b}"
|
||||
MY_PV="${MY_PV//_rc/rc}"
|
||||
MY_PV="${MY_PV//_p/-P}"
|
||||
MY_P="${PN}-${MY_PV}"
|
||||
MY_LDAP_PV="${LDAP_PV//-*/}"
|
||||
|
||||
DESCRIPTION="ISC Dynamic Host Configuration Protocol"
|
||||
HOMEPAGE="http://www.isc.org/products/DHCP"
|
||||
SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz
|
||||
http://cloud.github.com/downloads/dcantrell/ldap-for-dhcp/ldap-for-dhcp-${LDAP_PV}.tar.gz"
|
||||
|
||||
LICENSE="as-is BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
|
||||
IUSE="doc ipv6 selinux kernel_linux vim-syntax ldap ssl"
|
||||
|
||||
DEPEND="selinux? ( sec-policy/selinux-dhcp )
|
||||
kernel_linux? ( sys-apps/net-tools )
|
||||
vim-syntax? ( app-vim/dhcpd-syntax )
|
||||
ldap? ( net-nds/openldap
|
||||
ssl? ( dev-libs/openssl ) )"
|
||||
|
||||
PROVIDE="virtual/dhcpc"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
cd "${S}"
|
||||
|
||||
# Gentoo patches - these will probably never be accepted upstream
|
||||
# Fix some permission issues
|
||||
epatch "${FILESDIR}/${PN}"-3.0-fix-perms.patch
|
||||
# Enable dhclient to equery NTP servers
|
||||
epatch "${FILESDIR}/${PN}"-4.0-dhclient-ntp.patch
|
||||
# resolvconf support in dhclient-script
|
||||
epatch "${FILESDIR}/${PN}"-4.1-dhclient-resolvconf.patch
|
||||
# Stop downing the interface on Linux as that breaks link daemons
|
||||
# such as wpa_supplicant and netplug
|
||||
epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-no-down.patch
|
||||
# Quiet the isc blurb
|
||||
epatch "${FILESDIR}/${PN}"-4.1.1-no_isc_blurb-1.patch
|
||||
# Enable dhclient to get extra configuration from stdin
|
||||
epatch "${FILESDIR}/${PN}"-4.0.1-dhclient-stdin-conf.patch
|
||||
# Disable fallback interfaces when using BPF
|
||||
# This allows more than one dhclient instance on the BSD's
|
||||
epatch "${FILESDIR}/${PN}"-3.0.5-bpf-nofallback.patch
|
||||
|
||||
# NetworkManager support patches
|
||||
# If they fail to apply to future versions they will be dropped
|
||||
# Add dbus support to dhclient
|
||||
epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-dbus.patch
|
||||
|
||||
# Ldap patch for dhcp
|
||||
epatch "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}/dhcp-${MY_LDAP_PV}"-ldap.patch
|
||||
|
||||
# Brand the version with Gentoo
|
||||
# include revision if >0
|
||||
local newver="Gentoo"
|
||||
[[ ${PR} != "r0" ]] && newver="${newver}-${PR}"
|
||||
|
||||
sed -i "/AC_INIT/s/\(\[[0-9]\+\.[0-9]\+\.[0-9]\+\)/\1-${newver}/" \
|
||||
configure.ac || die
|
||||
|
||||
# Change the hook script locations of the scripts
|
||||
sed -i -e 's,/etc/dhclient-exit-hooks,/etc/dhcp/dhclient-exit-hooks,g' \
|
||||
-e 's,/etc/dhclient-enter-hooks,/etc/dhcp/dhclient-enter-hooks,g' \
|
||||
client/scripts/* || die
|
||||
|
||||
# No need for the linux script to force bash, #158540.
|
||||
sed -i -e 's,#!/bin/bash,#!/bin/sh,' client/scripts/linux || die
|
||||
|
||||
# Quiet the freebsd logger a little
|
||||
sed -i -e '/LOGGER=/ s/-s -p user.notice //g' client/scripts/freebsd || die
|
||||
|
||||
# Remove these options from the sample config
|
||||
sed -i -e "/\(script\|host-name\|domain-name\) / d" \
|
||||
client/dhclient.conf || die
|
||||
|
||||
# Only install different man pages if we don't have en
|
||||
if [[ " ${LINGUAS} " != *" en "* ]]; then
|
||||
# Install Japanese man pages
|
||||
if [[ " ${LINGUAS} " == *" ja "* && -d doc/ja_JP.eucJP ]]; then
|
||||
einfo "Installing Japanese documention"
|
||||
cp doc/ja_JP.eucJP/dhclient* client
|
||||
cp doc/ja_JP.eucJP/dhcp* common
|
||||
fi
|
||||
fi
|
||||
|
||||
# Now remove the non-english docs so there are no errors later
|
||||
[[ -d doc/ja_JP.eucJP ]] && rm -rf doc/ja_JP.eucJP
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
econf \
|
||||
--enable-paranoia \
|
||||
--sysconfdir /etc/dhcp \
|
||||
--with-cli-pid-file=/var/run/dhcp/dhclient.pid \
|
||||
--with-cli-lease-file=/var/lib/dhcp/dhclient.leases \
|
||||
--with-srv-pid-file=/var/run/dhcp/dhcpd.pid \
|
||||
--with-srv-lease-file=/var/lib/dhcp/dhcpd.leases \
|
||||
--with-relay-pid-file=/var/run/dhcp/dhcrelay.pid \
|
||||
$(use_enable ipv6 dhcpv6) \
|
||||
$(use_with ldap) \
|
||||
$(use_with ssl ldapcrypto) \
|
||||
|| die
|
||||
|
||||
emake || die "compile problem"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
for installdir in includes tests common minires dst omapip client dhcpctl relay server; do
|
||||
cd "${S}/${installdir}"
|
||||
if [ "${installdir}" == client ]; then
|
||||
make install DESTDIR="${D}" exec_prefix="" || die
|
||||
else
|
||||
make install DESTDIR="${D}" exec_prefix="/usr" || die
|
||||
fi
|
||||
done
|
||||
|
||||
cd "${S}"
|
||||
|
||||
exeinto /sbin
|
||||
if use kernel_linux; then
|
||||
newexe "${S}"/client/scripts/linux dhclient-script
|
||||
else
|
||||
newexe "${S}"/client/scripts/freebsd dhclient-script
|
||||
fi
|
||||
|
||||
if use doc; then
|
||||
dodoc README RELNOTES doc/*
|
||||
use ldap && dodoc "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/*.ldap "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/draft-ietf-dhc-ldap-schema-01.txt
|
||||
fi
|
||||
insinto /etc/dhcp
|
||||
newins client/dhclient.conf dhclient.conf.sample
|
||||
keepdir /var/{lib,run}/dhcp
|
||||
keepdir /var/lib/dhclient
|
||||
|
||||
# Install our server files
|
||||
insinto /etc/dhcp
|
||||
newins server/dhcpd.conf dhcpd.conf.sample
|
||||
newinitd "${FILESDIR}"/dhcpd.init2 dhcpd
|
||||
newinitd "${FILESDIR}"/dhcrelay.init dhcrelay
|
||||
newconfd "${FILESDIR}"/dhcpd.conf dhcpd
|
||||
newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay
|
||||
|
||||
# install ldap files
|
||||
if use ldap; then
|
||||
insinto /etc/openldap/schema
|
||||
doins "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/dhcp.*
|
||||
dosbin "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/dhcpd-conf-to-ldap
|
||||
fi
|
||||
|
||||
|
||||
# We never want portage to own this file
|
||||
rm -f "${D}"/var/lib/dhcp/dhcpd.leases
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
enewgroup dhcp
|
||||
enewuser dhcp -1 -1 /var/lib/dhcp dhcp
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
chown -R dhcp:dhcp "${ROOT}"/var/{lib,run}/dhcp
|
||||
|
||||
if [[ -e "${ROOT}"/etc/init.d/dhcp ]] ; then
|
||||
ewarn
|
||||
ewarn "WARNING: The dhcp init script has been renamed to dhcpd"
|
||||
ewarn "/etc/init.d/dhcp and /etc/conf.d/dhcp need to be removed and"
|
||||
ewarn "and dhcp should be removed from the default runlevel"
|
||||
ewarn
|
||||
fi
|
||||
|
||||
einfo "You can edit /etc/conf.d/dhcpd to customize dhcp settings."
|
||||
einfo
|
||||
einfo "If you would like to run dhcpd in a chroot, simply configure the"
|
||||
einfo "DHCPD_CHROOT directory in /etc/conf.d/dhcpd and then run:"
|
||||
einfo " emerge --config =${PF}"
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
local CHROOT="$(
|
||||
sed -n -e 's/^[[:blank:]]\?DHCPD_CHROOT="*\([^#"]\+\)"*/\1/p' \
|
||||
"${ROOT}"/etc/conf.d/dhcpd
|
||||
)"
|
||||
|
||||
if [[ -z ${CHROOT} ]]; then
|
||||
eerror "CHROOT not defined in /etc/conf.d/dhcpd"
|
||||
return 1
|
||||
fi
|
||||
|
||||
CHROOT="${ROOT}/${CHROOT}"
|
||||
|
||||
if [[ -d ${CHROOT} ]] ; then
|
||||
ewarn "${CHROOT} already exists - aborting"
|
||||
return 0
|
||||
fi
|
||||
|
||||
ebegin "Setting up the chroot directory"
|
||||
mkdir -m 0755 -p "${CHROOT}/"{dev,etc,var/lib,var/run/dhcp}
|
||||
cp /etc/{localtime,resolv.conf} "${CHROOT}"/etc
|
||||
cp -R /etc/dhcp "${CHROOT}"/etc
|
||||
cp -R /var/lib/dhcp "${CHROOT}"/var/lib
|
||||
ln -s ../../var/lib/dhcp "${CHROOT}"/etc/dhcp/lib
|
||||
chown -R dhcp:dhcp "${CHROOT}"/var/{lib,run}/dhcp
|
||||
eend 0
|
||||
|
||||
local logger="$(best_version virtual/logger)"
|
||||
einfo "To enable logging from the dhcpd server, configure your"
|
||||
einfo "logger (${logger}) to listen on ${CHROOT}/dev/log"
|
||||
}
|
@ -1,223 +0,0 @@
|
||||
# Copyright 1999-2011 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-4.1.0.ebuild,v 1.2 2010/01/15 19:00:22 ulm Exp $
|
||||
|
||||
inherit eutils flag-o-matic autotools
|
||||
|
||||
LDAP_PV="4.1.1-2"
|
||||
|
||||
MY_PV="${PV//_alpha/a}"
|
||||
MY_PV="${MY_PV//_beta/b}"
|
||||
MY_PV="${MY_PV//_rc/rc}"
|
||||
MY_PV="${MY_PV//_p/-P}"
|
||||
MY_P="${PN}-${MY_PV}"
|
||||
MY_LDAP_PV="${LDAP_PV//-*/}"
|
||||
|
||||
DESCRIPTION="ISC Dynamic Host Configuration Protocol"
|
||||
HOMEPAGE="http://www.isc.org/products/DHCP"
|
||||
SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz
|
||||
http://cloud.github.com/downloads/dcantrell/ldap-for-dhcp/ldap-for-dhcp-${LDAP_PV}.tar.gz"
|
||||
|
||||
LICENSE="as-is BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
|
||||
IUSE="doc ipv6 selinux kernel_linux vim-syntax ldap ssl"
|
||||
|
||||
DEPEND="selinux? ( sec-policy/selinux-dhcp )
|
||||
kernel_linux? ( sys-apps/net-tools )
|
||||
vim-syntax? ( app-vim/dhcpd-syntax )
|
||||
ldap? ( net-nds/openldap
|
||||
ssl? ( dev-libs/openssl ) )"
|
||||
|
||||
PROVIDE="virtual/dhcpc"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
cd "${S}"
|
||||
|
||||
# Gentoo patches - these will probably never be accepted upstream
|
||||
# Fix some permission issues
|
||||
epatch "${FILESDIR}/${PN}"-3.0-fix-perms.patch
|
||||
# Enable dhclient to equery NTP servers
|
||||
epatch "${FILESDIR}/${PN}"-4.0-dhclient-ntp.patch
|
||||
# resolvconf support in dhclient-script
|
||||
epatch "${FILESDIR}/${PN}"-4.1-dhclient-resolvconf.patch
|
||||
# Stop downing the interface on Linux as that breaks link daemons
|
||||
# such as wpa_supplicant and netplug
|
||||
epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-no-down.patch
|
||||
# Quiet the isc blurb
|
||||
epatch "${FILESDIR}/${PN}"-4.1.1-no_isc_blurb-1.patch
|
||||
# Enable dhclient to get extra configuration from stdin
|
||||
epatch "${FILESDIR}/${PN}"-4.0.1-dhclient-stdin-conf.patch
|
||||
# Disable fallback interfaces when using BPF
|
||||
# This allows more than one dhclient instance on the BSD's
|
||||
epatch "${FILESDIR}/${PN}"-3.0.5-bpf-nofallback.patch
|
||||
|
||||
# NetworkManager support patches
|
||||
# If they fail to apply to future versions they will be dropped
|
||||
# Add dbus support to dhclient
|
||||
epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-dbus.patch
|
||||
|
||||
# Ldap patch for dhcp
|
||||
epatch "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}/dhcp-${MY_LDAP_PV}"-ldap.patch
|
||||
|
||||
# Brand the version with Gentoo
|
||||
# include revision if >0
|
||||
local newver="Gentoo"
|
||||
[[ ${PR} != "r0" ]] && newver="${newver}-${PR}"
|
||||
|
||||
sed -i "/AC_INIT/s/\(\[[0-9]\+\.[0-9]\+\.[0-9]\+\)/\1-${newver}/" \
|
||||
configure.ac || die
|
||||
|
||||
# Change the hook script locations of the scripts
|
||||
sed -i -e 's,/etc/dhclient-exit-hooks,/etc/dhcp/dhclient-exit-hooks,g' \
|
||||
-e 's,/etc/dhclient-enter-hooks,/etc/dhcp/dhclient-enter-hooks,g' \
|
||||
client/scripts/* || die
|
||||
|
||||
# No need for the linux script to force bash, #158540.
|
||||
sed -i -e 's,#!/bin/bash,#!/bin/sh,' client/scripts/linux || die
|
||||
|
||||
# Quiet the freebsd logger a little
|
||||
sed -i -e '/LOGGER=/ s/-s -p user.notice //g' client/scripts/freebsd || die
|
||||
|
||||
# Remove these options from the sample config
|
||||
sed -i -e "/\(script\|host-name\|domain-name\) / d" \
|
||||
client/dhclient.conf || die
|
||||
|
||||
# Only install different man pages if we don't have en
|
||||
if [[ " ${LINGUAS} " != *" en "* ]]; then
|
||||
# Install Japanese man pages
|
||||
if [[ " ${LINGUAS} " == *" ja "* && -d doc/ja_JP.eucJP ]]; then
|
||||
einfo "Installing Japanese documention"
|
||||
cp doc/ja_JP.eucJP/dhclient* client
|
||||
cp doc/ja_JP.eucJP/dhcp* common
|
||||
fi
|
||||
fi
|
||||
|
||||
# Now remove the non-english docs so there are no errors later
|
||||
[[ -d doc/ja_JP.eucJP ]] && rm -rf doc/ja_JP.eucJP
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
econf \
|
||||
--enable-paranoia \
|
||||
--sysconfdir /etc/dhcp \
|
||||
--with-cli-pid-file=/var/run/dhcp/dhclient.pid \
|
||||
--with-cli-lease-file=/var/lib/dhcp/dhclient.leases \
|
||||
--with-srv-pid-file=/var/run/dhcp/dhcpd.pid \
|
||||
--with-srv-lease-file=/var/lib/dhcp/dhcpd.leases \
|
||||
--with-relay-pid-file=/var/run/dhcp/dhcrelay.pid \
|
||||
$(use_enable ipv6 dhcpv6) \
|
||||
$(use_with ldap) \
|
||||
$(use_with ssl ldapcrypto) \
|
||||
|| die
|
||||
|
||||
emake || die "compile problem"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
for installdir in includes tests common minires dst omapip client dhcpctl relay server; do
|
||||
cd "${S}/${installdir}"
|
||||
if [ "${installdir}" == client ]; then
|
||||
make install DESTDIR="${D}" exec_prefix="" || die
|
||||
else
|
||||
make install DESTDIR="${D}" exec_prefix="/usr" || die
|
||||
fi
|
||||
done
|
||||
|
||||
cd "${S}"
|
||||
|
||||
exeinto /sbin
|
||||
if use kernel_linux; then
|
||||
newexe "${S}"/client/scripts/linux dhclient-script
|
||||
else
|
||||
newexe "${S}"/client/scripts/freebsd dhclient-script
|
||||
fi
|
||||
|
||||
if use doc; then
|
||||
dodoc README RELNOTES doc/*
|
||||
use ldap && dodoc "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/*.ldap "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/draft-ietf-dhc-ldap-schema-01.txt
|
||||
fi
|
||||
insinto /etc/dhcp
|
||||
newins client/dhclient.conf dhclient.conf.sample
|
||||
keepdir /var/{lib,run}/dhcp
|
||||
keepdir /var/lib/dhclient
|
||||
|
||||
# Install our server files
|
||||
insinto /etc/dhcp
|
||||
newins server/dhcpd.conf dhcpd.conf.sample
|
||||
newinitd "${FILESDIR}"/dhcpd.init2 dhcpd
|
||||
newinitd "${FILESDIR}"/dhcrelay.init dhcrelay
|
||||
newconfd "${FILESDIR}"/dhcpd.conf dhcpd
|
||||
newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay
|
||||
|
||||
# install ldap files
|
||||
if use ldap; then
|
||||
insinto /etc/openldap/schema
|
||||
doins "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/dhcp.*
|
||||
dosbin "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/dhcpd-conf-to-ldap
|
||||
fi
|
||||
|
||||
|
||||
# We never want portage to own this file
|
||||
rm -f "${D}"/var/lib/dhcp/dhcpd.leases
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
enewgroup dhcp
|
||||
enewuser dhcp -1 -1 /var/lib/dhcp dhcp
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
chown -R dhcp:dhcp "${ROOT}"/var/{lib,run}/dhcp
|
||||
|
||||
if [[ -e "${ROOT}"/etc/init.d/dhcp ]] ; then
|
||||
ewarn
|
||||
ewarn "WARNING: The dhcp init script has been renamed to dhcpd"
|
||||
ewarn "/etc/init.d/dhcp and /etc/conf.d/dhcp need to be removed and"
|
||||
ewarn "and dhcp should be removed from the default runlevel"
|
||||
ewarn
|
||||
fi
|
||||
|
||||
einfo "You can edit /etc/conf.d/dhcpd to customize dhcp settings."
|
||||
einfo
|
||||
einfo "If you would like to run dhcpd in a chroot, simply configure the"
|
||||
einfo "DHCPD_CHROOT directory in /etc/conf.d/dhcpd and then run:"
|
||||
einfo " emerge --config =${PF}"
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
local CHROOT="$(
|
||||
sed -n -e 's/^[[:blank:]]\?DHCPD_CHROOT="*\([^#"]\+\)"*/\1/p' \
|
||||
"${ROOT}"/etc/conf.d/dhcpd
|
||||
)"
|
||||
|
||||
if [[ -z ${CHROOT} ]]; then
|
||||
eerror "CHROOT not defined in /etc/conf.d/dhcpd"
|
||||
return 1
|
||||
fi
|
||||
|
||||
CHROOT="${ROOT}/${CHROOT}"
|
||||
|
||||
if [[ -d ${CHROOT} ]] ; then
|
||||
ewarn "${CHROOT} already exists - aborting"
|
||||
return 0
|
||||
fi
|
||||
|
||||
ebegin "Setting up the chroot directory"
|
||||
mkdir -m 0755 -p "${CHROOT}/"{dev,etc,var/lib,var/run/dhcp}
|
||||
cp /etc/{localtime,resolv.conf} "${CHROOT}"/etc
|
||||
cp -R /etc/dhcp "${CHROOT}"/etc
|
||||
cp -R /var/lib/dhcp "${CHROOT}"/var/lib
|
||||
ln -s ../../var/lib/dhcp "${CHROOT}"/etc/dhcp/lib
|
||||
chown -R dhcp:dhcp "${CHROOT}"/var/{lib,run}/dhcp
|
||||
eend 0
|
||||
|
||||
local logger="$(best_version virtual/logger)"
|
||||
einfo "To enable logging from the dhcpd server, configure your"
|
||||
einfo "logger (${logger}) to listen on ${CHROOT}/dev/log"
|
||||
}
|
@ -1,215 +0,0 @@
|
||||
# Copyright 1999-2010 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-4.1.0.ebuild,v 1.2 2010/01/15 19:00:22 ulm Exp $
|
||||
|
||||
inherit eutils flag-o-matic autotools
|
||||
|
||||
MY_PV="${PV//_alpha/a}"
|
||||
MY_PV="${MY_PV//_beta/b}"
|
||||
MY_PV="${MY_PV//_rc/rc}"
|
||||
MY_P="${PN}-${MY_PV}"
|
||||
DESCRIPTION="ISC Dynamic Host Configuration Protocol"
|
||||
HOMEPAGE="http://www.isc.org/products/DHCP"
|
||||
SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz"
|
||||
|
||||
LICENSE="as-is BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
|
||||
IUSE="doc ipv6 selinux kernel_linux vim-syntax ldap ssl"
|
||||
|
||||
DEPEND="selinux? ( sec-policy/selinux-dhcp )
|
||||
kernel_linux? ( sys-apps/net-tools )
|
||||
vim-syntax? ( app-vim/dhcpd-syntax )
|
||||
ldap? ( net-nds/openldap
|
||||
ssl? ( dev-libs/openssl ) )"
|
||||
|
||||
|
||||
PROVIDE="virtual/dhcpc"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
cd "${S}"
|
||||
|
||||
# Gentoo patches - these will probably never be accepted upstream
|
||||
# Fix some permission issues
|
||||
epatch "${FILESDIR}/${PN}"-3.0-fix-perms.patch
|
||||
# Enable dhclient to equery NTP servers
|
||||
epatch "${FILESDIR}/${PN}"-4.0-dhclient-ntp.patch
|
||||
# resolvconf support in dhclient-script
|
||||
epatch "${FILESDIR}/${PN}"-4.0-dhclient-resolvconf.patch
|
||||
# Stop downing the interface on Linux as that breaks link daemons
|
||||
# such as wpa_supplicant and netplug
|
||||
epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-no-down.patch
|
||||
# Quiet the isc blurb
|
||||
epatch "${FILESDIR}/${PN}"-4.2-no_isc_blurb.patch
|
||||
# Enable dhclient to get extra configuration from stdin
|
||||
epatch "${FILESDIR}/${PN}"-4.0.1-dhclient-stdin-conf.patch
|
||||
# Disable fallback interfaces when using BPF
|
||||
# This allows more than one dhclient instance on the BSD's
|
||||
epatch "${FILESDIR}/${PN}"-4.2-bpf-nofallback.patch
|
||||
|
||||
# NetworkManager support patches
|
||||
# If they fail to apply to future versions they will be dropped
|
||||
# Add dbus support to dhclient
|
||||
epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-dbus.patch
|
||||
|
||||
# Brand the version with Gentoo
|
||||
# include revision if >0
|
||||
local newver="Gentoo"
|
||||
[[ ${PR} != "r0" ]] && newver="${newver}-${PR}"
|
||||
|
||||
sed -i "/AC_INIT/s/\(\[[0-9]\+\.[0-9]\+\.[0-9]\+\)/\1-${newver}/" \
|
||||
configure.ac || die
|
||||
|
||||
# Change the hook script locations of the scripts
|
||||
sed -i -e 's,/etc/dhclient-exit-hooks,/etc/dhcp/dhclient-exit-hooks,g' \
|
||||
-e 's,/etc/dhclient-enter-hooks,/etc/dhcp/dhclient-enter-hooks,g' \
|
||||
client/scripts/* || die
|
||||
|
||||
# No need for the linux script to force bash, #158540.
|
||||
sed -i -e 's,#!/bin/bash,#!/bin/sh,' client/scripts/linux || die
|
||||
|
||||
# Quiet the freebsd logger a little
|
||||
sed -i -e '/LOGGER=/ s/-s -p user.notice //g' client/scripts/freebsd || die
|
||||
|
||||
# Remove these options from the sample config
|
||||
sed -i -e "/\(script\|host-name\|domain-name\) / d" \
|
||||
client/dhclient.conf || die
|
||||
|
||||
# Only install different man pages if we don't have en
|
||||
if [[ " ${LINGUAS} " != *" en "* ]]; then
|
||||
# Install Japanese man pages
|
||||
if [[ " ${LINGUAS} " == *" ja "* && -d doc/ja_JP.eucJP ]]; then
|
||||
einfo "Installing Japanese documention"
|
||||
cp doc/ja_JP.eucJP/dhclient* client
|
||||
cp doc/ja_JP.eucJP/dhcp* common
|
||||
fi
|
||||
fi
|
||||
|
||||
# Now remove the non-english docs so there are no errors later
|
||||
[[ -d doc/ja_JP.eucJP ]] && rm -rf doc/ja_JP.eucJP
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
econf \
|
||||
--enable-paranoia \
|
||||
--sysconfdir /etc/dhcp \
|
||||
--with-cli-pid-file=/var/run/dhcp/dhclient.pid \
|
||||
--with-cli-lease-file=/var/lib/dhcp/dhclient.leases \
|
||||
--with-srv-pid-file=/var/run/dhcp/dhcpd.pid \
|
||||
--with-srv-lease-file=/var/lib/dhcp/dhcpd.leases \
|
||||
--with-relay-pid-file=/var/run/dhcp/dhcrelay.pid \
|
||||
$(use_enable ipv6 dhcpv6) \
|
||||
$(use_with ldap) \
|
||||
$(use_with ssl ldapcrypto) \
|
||||
|| die
|
||||
|
||||
emake || die "compile problem"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
for installdir in includes tests common minires dst omapip client dhcpctl relay server; do
|
||||
cd "${S}/${installdir}"
|
||||
if [ "${installdir}" == client ]; then
|
||||
make install DESTDIR="${D}" exec_prefix="" || die
|
||||
else
|
||||
make install DESTDIR="${D}" exec_prefix="/usr" || die
|
||||
fi
|
||||
done
|
||||
|
||||
cd "${S}"
|
||||
|
||||
exeinto /sbin
|
||||
if use kernel_linux; then
|
||||
newexe "${S}"/client/scripts/linux dhclient-script
|
||||
else
|
||||
newexe "${S}"/client/scripts/freebsd dhclient-script
|
||||
fi
|
||||
|
||||
if use doc; then
|
||||
dodoc README RELNOTES doc/*
|
||||
use ldap && dodoc "contrib/ldap"/*.ldap
|
||||
fi
|
||||
insinto /etc/dhcp
|
||||
newins client/dhclient.conf dhclient.conf.sample
|
||||
keepdir /var/{lib,run}/dhcp
|
||||
keepdir /var/lib/dhclient
|
||||
|
||||
# Install our server files
|
||||
insinto /etc/dhcp
|
||||
newins server/dhcpd.conf dhcpd.conf.sample
|
||||
newinitd "${FILESDIR}"/dhcpd.init2 dhcpd
|
||||
newinitd "${FILESDIR}"/dhcrelay.init dhcrelay
|
||||
newconfd "${FILESDIR}"/dhcpd.conf dhcpd
|
||||
newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay
|
||||
|
||||
# install ldap files
|
||||
if use ldap; then
|
||||
insinto /etc/openldap/schema
|
||||
doins "contrib/ldap"/dhcp.*
|
||||
dosbin "contrib/ldap"/dhcpd-conf-to-ldap
|
||||
fi
|
||||
|
||||
|
||||
# We never want portage to own this file
|
||||
rm -f "${D}"/var/lib/dhcp/dhcpd.leases
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
enewgroup dhcp
|
||||
enewuser dhcp -1 -1 /var/lib/dhcp dhcp
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
chown -R dhcp:dhcp "${ROOT}"/var/{lib,run}/dhcp
|
||||
|
||||
if [[ -e "${ROOT}"/etc/init.d/dhcp ]] ; then
|
||||
ewarn
|
||||
ewarn "WARNING: The dhcp init script has been renamed to dhcpd"
|
||||
ewarn "/etc/init.d/dhcp and /etc/conf.d/dhcp need to be removed and"
|
||||
ewarn "and dhcp should be removed from the default runlevel"
|
||||
ewarn
|
||||
fi
|
||||
|
||||
einfo "You can edit /etc/conf.d/dhcpd to customize dhcp settings."
|
||||
einfo
|
||||
einfo "If you would like to run dhcpd in a chroot, simply configure the"
|
||||
einfo "DHCPD_CHROOT directory in /etc/conf.d/dhcpd and then run:"
|
||||
einfo " emerge --config =${PF}"
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
local CHROOT="$(
|
||||
sed -n -e 's/^[[:blank:]]\?DHCPD_CHROOT="*\([^#"]\+\)"*/\1/p' \
|
||||
"${ROOT}"/etc/conf.d/dhcpd
|
||||
)"
|
||||
|
||||
if [[ -z ${CHROOT} ]]; then
|
||||
eerror "CHROOT not defined in /etc/conf.d/dhcpd"
|
||||
return 1
|
||||
fi
|
||||
|
||||
CHROOT="${ROOT}/${CHROOT}"
|
||||
|
||||
if [[ -d ${CHROOT} ]] ; then
|
||||
ewarn "${CHROOT} already exists - aborting"
|
||||
return 0
|
||||
fi
|
||||
|
||||
ebegin "Setting up the chroot directory"
|
||||
mkdir -m 0755 -p "${CHROOT}/"{dev,etc,var/lib,var/run/dhcp}
|
||||
cp /etc/{localtime,resolv.conf} "${CHROOT}"/etc
|
||||
cp -R /etc/dhcp "${CHROOT}"/etc
|
||||
cp -R /var/lib/dhcp "${CHROOT}"/var/lib
|
||||
ln -s ../../var/lib/dhcp "${CHROOT}"/etc/dhcp/lib
|
||||
chown -R dhcp:dhcp "${CHROOT}"/var/{lib,run}/dhcp
|
||||
eend 0
|
||||
|
||||
local logger="$(best_version virtual/logger)"
|
||||
einfo "To enable logging from the dhcpd server, configure your"
|
||||
einfo "logger (${logger}) to listen on ${CHROOT}/dev/log"
|
||||
}
|
@ -1,216 +0,0 @@
|
||||
# Copyright 1999-2010 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $Header: /var/cvsroot/gentoo-x86/net-misc/dhcp/dhcp-4.1.0.ebuild,v 1.2 2010/01/15 19:00:22 ulm Exp $
|
||||
|
||||
inherit eutils flag-o-matic autotools
|
||||
|
||||
MY_PV="${PV//_alpha/a}"
|
||||
MY_PV="${MY_PV//_beta/b}"
|
||||
MY_PV="${MY_PV//_rc/rc}"
|
||||
MY_PV="${MY_PV//_p/-P}"
|
||||
MY_P="${PN}-${MY_PV}"
|
||||
DESCRIPTION="ISC Dynamic Host Configuration Protocol"
|
||||
HOMEPAGE="http://www.isc.org/products/DHCP"
|
||||
SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz"
|
||||
|
||||
LICENSE="as-is BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
|
||||
IUSE="doc ipv6 selinux kernel_linux vim-syntax ldap ssl"
|
||||
|
||||
DEPEND="selinux? ( sec-policy/selinux-dhcp )
|
||||
kernel_linux? ( sys-apps/net-tools )
|
||||
vim-syntax? ( app-vim/dhcpd-syntax )
|
||||
ldap? ( net-nds/openldap
|
||||
ssl? ( dev-libs/openssl ) )"
|
||||
|
||||
|
||||
PROVIDE="virtual/dhcpc"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
cd "${S}"
|
||||
|
||||
# Gentoo patches - these will probably never be accepted upstream
|
||||
# Fix some permission issues
|
||||
epatch "${FILESDIR}/${PN}"-3.0-fix-perms.patch
|
||||
# Enable dhclient to equery NTP servers
|
||||
epatch "${FILESDIR}/${PN}"-4.0-dhclient-ntp.patch
|
||||
# resolvconf support in dhclient-script
|
||||
epatch "${FILESDIR}/${PN}"-4.0-dhclient-resolvconf.patch
|
||||
# Stop downing the interface on Linux as that breaks link daemons
|
||||
# such as wpa_supplicant and netplug
|
||||
epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-no-down.patch
|
||||
# Quiet the isc blurb
|
||||
epatch "${FILESDIR}/${PN}"-4.2-no_isc_blurb.patch
|
||||
# Enable dhclient to get extra configuration from stdin
|
||||
epatch "${FILESDIR}/${PN}"-4.0.1-dhclient-stdin-conf.patch
|
||||
# Disable fallback interfaces when using BPF
|
||||
# This allows more than one dhclient instance on the BSD's
|
||||
epatch "${FILESDIR}/${PN}"-4.2-bpf-nofallback.patch
|
||||
|
||||
# NetworkManager support patches
|
||||
# If they fail to apply to future versions they will be dropped
|
||||
# Add dbus support to dhclient
|
||||
epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-dbus.patch
|
||||
|
||||
# Brand the version with Gentoo
|
||||
# include revision if >0
|
||||
local newver="Gentoo"
|
||||
[[ ${PR} != "r0" ]] && newver="${newver}-${PR}"
|
||||
|
||||
sed -i "/AC_INIT/s/\(\[[0-9]\+\.[0-9]\+\.[0-9]\+\)/\1-${newver}/" \
|
||||
configure.ac || die
|
||||
|
||||
# Change the hook script locations of the scripts
|
||||
sed -i -e 's,/etc/dhclient-exit-hooks,/etc/dhcp/dhclient-exit-hooks,g' \
|
||||
-e 's,/etc/dhclient-enter-hooks,/etc/dhcp/dhclient-enter-hooks,g' \
|
||||
client/scripts/* || die
|
||||
|
||||
# No need for the linux script to force bash, #158540.
|
||||
sed -i -e 's,#!/bin/bash,#!/bin/sh,' client/scripts/linux || die
|
||||
|
||||
# Quiet the freebsd logger a little
|
||||
sed -i -e '/LOGGER=/ s/-s -p user.notice //g' client/scripts/freebsd || die
|
||||
|
||||
# Remove these options from the sample config
|
||||
sed -i -e "/\(script\|host-name\|domain-name\) / d" \
|
||||
client/dhclient.conf || die
|
||||
|
||||
# Only install different man pages if we don't have en
|
||||
if [[ " ${LINGUAS} " != *" en "* ]]; then
|
||||
# Install Japanese man pages
|
||||
if [[ " ${LINGUAS} " == *" ja "* && -d doc/ja_JP.eucJP ]]; then
|
||||
einfo "Installing Japanese documention"
|
||||
cp doc/ja_JP.eucJP/dhclient* client
|
||||
cp doc/ja_JP.eucJP/dhcp* common
|
||||
fi
|
||||
fi
|
||||
|
||||
# Now remove the non-english docs so there are no errors later
|
||||
[[ -d doc/ja_JP.eucJP ]] && rm -rf doc/ja_JP.eucJP
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
econf \
|
||||
--enable-paranoia \
|
||||
--sysconfdir /etc/dhcp \
|
||||
--with-cli-pid-file=/var/run/dhcp/dhclient.pid \
|
||||
--with-cli-lease-file=/var/lib/dhcp/dhclient.leases \
|
||||
--with-srv-pid-file=/var/run/dhcp/dhcpd.pid \
|
||||
--with-srv-lease-file=/var/lib/dhcp/dhcpd.leases \
|
||||
--with-relay-pid-file=/var/run/dhcp/dhcrelay.pid \
|
||||
$(use_enable ipv6 dhcpv6) \
|
||||
$(use_with ldap) \
|
||||
$(use_with ssl ldapcrypto) \
|
||||
|| die
|
||||
|
||||
emake || die "compile problem"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
for installdir in includes tests common minires dst omapip client dhcpctl relay server; do
|
||||
cd "${S}/${installdir}"
|
||||
if [ "${installdir}" == client ]; then
|
||||
make install DESTDIR="${D}" exec_prefix="" || die
|
||||
else
|
||||
make install DESTDIR="${D}" exec_prefix="/usr" || die
|
||||
fi
|
||||
done
|
||||
|
||||
cd "${S}"
|
||||
|
||||
exeinto /sbin
|
||||
if use kernel_linux; then
|
||||
newexe "${S}"/client/scripts/linux dhclient-script
|
||||
else
|
||||
newexe "${S}"/client/scripts/freebsd dhclient-script
|
||||
fi
|
||||
|
||||
if use doc; then
|
||||
dodoc README RELNOTES doc/*
|
||||
use ldap && dodoc "contrib/ldap"/*.ldap
|
||||
fi
|
||||
insinto /etc/dhcp
|
||||
newins client/dhclient.conf dhclient.conf.sample
|
||||
keepdir /var/{lib,run}/dhcp
|
||||
keepdir /var/lib/dhclient
|
||||
|
||||
# Install our server files
|
||||
insinto /etc/dhcp
|
||||
newins server/dhcpd.conf dhcpd.conf.sample
|
||||
newinitd "${FILESDIR}"/dhcpd.init2 dhcpd
|
||||
newinitd "${FILESDIR}"/dhcrelay.init dhcrelay
|
||||
newconfd "${FILESDIR}"/dhcpd.conf dhcpd
|
||||
newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay
|
||||
|
||||
# install ldap files
|
||||
if use ldap; then
|
||||
insinto /etc/openldap/schema
|
||||
doins "contrib/ldap"/dhcp.*
|
||||
dosbin "contrib/ldap"/dhcpd-conf-to-ldap
|
||||
fi
|
||||
|
||||
|
||||
# We never want portage to own this file
|
||||
rm -f "${D}"/var/lib/dhcp/dhcpd.leases
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
enewgroup dhcp
|
||||
enewuser dhcp -1 -1 /var/lib/dhcp dhcp
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
chown -R dhcp:dhcp "${ROOT}"/var/{lib,run}/dhcp
|
||||
|
||||
if [[ -e "${ROOT}"/etc/init.d/dhcp ]] ; then
|
||||
ewarn
|
||||
ewarn "WARNING: The dhcp init script has been renamed to dhcpd"
|
||||
ewarn "/etc/init.d/dhcp and /etc/conf.d/dhcp need to be removed and"
|
||||
ewarn "and dhcp should be removed from the default runlevel"
|
||||
ewarn
|
||||
fi
|
||||
|
||||
einfo "You can edit /etc/conf.d/dhcpd to customize dhcp settings."
|
||||
einfo
|
||||
einfo "If you would like to run dhcpd in a chroot, simply configure the"
|
||||
einfo "DHCPD_CHROOT directory in /etc/conf.d/dhcpd and then run:"
|
||||
einfo " emerge --config =${PF}"
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
local CHROOT="$(
|
||||
sed -n -e 's/^[[:blank:]]\?DHCPD_CHROOT="*\([^#"]\+\)"*/\1/p' \
|
||||
"${ROOT}"/etc/conf.d/dhcpd
|
||||
)"
|
||||
|
||||
if [[ -z ${CHROOT} ]]; then
|
||||
eerror "CHROOT not defined in /etc/conf.d/dhcpd"
|
||||
return 1
|
||||
fi
|
||||
|
||||
CHROOT="${ROOT}/${CHROOT}"
|
||||
|
||||
if [[ -d ${CHROOT} ]] ; then
|
||||
ewarn "${CHROOT} already exists - aborting"
|
||||
return 0
|
||||
fi
|
||||
|
||||
ebegin "Setting up the chroot directory"
|
||||
mkdir -m 0755 -p "${CHROOT}/"{dev,etc,var/lib,var/run/dhcp}
|
||||
cp /etc/{localtime,resolv.conf} "${CHROOT}"/etc
|
||||
cp -R /etc/dhcp "${CHROOT}"/etc
|
||||
cp -R /var/lib/dhcp "${CHROOT}"/var/lib
|
||||
ln -s ../../var/lib/dhcp "${CHROOT}"/etc/dhcp/lib
|
||||
chown -R dhcp:dhcp "${CHROOT}"/var/{lib,run}/dhcp
|
||||
eend 0
|
||||
|
||||
local logger="$(best_version virtual/logger)"
|
||||
einfo "To enable logging from the dhcpd server, configure your"
|
||||
einfo "logger (${logger}) to listen on ${CHROOT}/dev/log"
|
||||
}
|
@ -1,216 +0,0 @@
|
||||
# Copyright 1999-2010 Gentoo Foundation
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
# $
|
||||
|
||||
inherit eutils flag-o-matic autotools
|
||||
|
||||
MY_PV="${PV//_alpha/a}"
|
||||
MY_PV="${MY_PV//_beta/b}"
|
||||
MY_PV="${MY_PV//_rc/rc}"
|
||||
MY_PV="${MY_PV//_p/-P}"
|
||||
MY_P="${PN}-${MY_PV}"
|
||||
DESCRIPTION="ISC Dynamic Host Configuration Protocol"
|
||||
HOMEPAGE="http://www.isc.org/products/DHCP"
|
||||
SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz"
|
||||
|
||||
LICENSE="as-is BSD"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
|
||||
IUSE="doc ipv6 selinux kernel_linux vim-syntax ldap ssl"
|
||||
|
||||
DEPEND="selinux? ( sec-policy/selinux-dhcp )
|
||||
kernel_linux? ( sys-apps/net-tools )
|
||||
vim-syntax? ( app-vim/dhcpd-syntax )
|
||||
ldap? ( net-nds/openldap
|
||||
ssl? ( dev-libs/openssl ) )"
|
||||
|
||||
|
||||
PROVIDE="virtual/dhcpc"
|
||||
|
||||
S="${WORKDIR}/${MY_P}"
|
||||
|
||||
src_unpack() {
|
||||
unpack ${A}
|
||||
cd "${S}"
|
||||
|
||||
# Gentoo patches - these will probably never be accepted upstream
|
||||
# Fix some permission issues
|
||||
epatch "${FILESDIR}/${PN}"-3.0-fix-perms.patch
|
||||
# Enable dhclient to equery NTP servers
|
||||
epatch "${FILESDIR}/${PN}"-4.0-dhclient-ntp.patch
|
||||
# resolvconf support in dhclient-script
|
||||
epatch "${FILESDIR}/${PN}"-4.0-dhclient-resolvconf.patch
|
||||
# Stop downing the interface on Linux as that breaks link daemons
|
||||
# such as wpa_supplicant and netplug
|
||||
epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-no-down.patch
|
||||
# Quiet the isc blurb
|
||||
epatch "${FILESDIR}/${PN}"-4.2-no_isc_blurb.patch
|
||||
# Enable dhclient to get extra configuration from stdin
|
||||
epatch "${FILESDIR}/${PN}"-4.0.1-dhclient-stdin-conf.patch
|
||||
# Disable fallback interfaces when using BPF
|
||||
# This allows more than one dhclient instance on the BSD's
|
||||
epatch "${FILESDIR}/${PN}"-4.2-bpf-nofallback.patch
|
||||
|
||||
# NetworkManager support patches
|
||||
# If they fail to apply to future versions they will be dropped
|
||||
# Add dbus support to dhclient
|
||||
epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-dbus.patch
|
||||
|
||||
# Brand the version with Gentoo
|
||||
# include revision if >0
|
||||
local newver="Gentoo"
|
||||
[[ ${PR} != "r0" ]] && newver="${newver}-${PR}"
|
||||
|
||||
sed -i "/AC_INIT/s/\(\[[0-9]\+\.[0-9]\+\.[0-9]\+\)/\1-${newver}/" \
|
||||
configure.ac || die
|
||||
|
||||
# Change the hook script locations of the scripts
|
||||
sed -i -e 's,/etc/dhclient-exit-hooks,/etc/dhcp/dhclient-exit-hooks,g' \
|
||||
-e 's,/etc/dhclient-enter-hooks,/etc/dhcp/dhclient-enter-hooks,g' \
|
||||
client/scripts/* || die
|
||||
|
||||
# No need for the linux script to force bash, #158540.
|
||||
sed -i -e 's,#!/bin/bash,#!/bin/sh,' client/scripts/linux || die
|
||||
|
||||
# Quiet the freebsd logger a little
|
||||
sed -i -e '/LOGGER=/ s/-s -p user.notice //g' client/scripts/freebsd || die
|
||||
|
||||
# Remove these options from the sample config
|
||||
sed -i -e "/\(script\|host-name\|domain-name\) / d" \
|
||||
client/dhclient.conf || die
|
||||
|
||||
# Only install different man pages if we don't have en
|
||||
if [[ " ${LINGUAS} " != *" en "* ]]; then
|
||||
# Install Japanese man pages
|
||||
if [[ " ${LINGUAS} " == *" ja "* && -d doc/ja_JP.eucJP ]]; then
|
||||
einfo "Installing Japanese documention"
|
||||
cp doc/ja_JP.eucJP/dhclient* client
|
||||
cp doc/ja_JP.eucJP/dhcp* common
|
||||
fi
|
||||
fi
|
||||
|
||||
# Now remove the non-english docs so there are no errors later
|
||||
[[ -d doc/ja_JP.eucJP ]] && rm -rf doc/ja_JP.eucJP
|
||||
|
||||
eautoreconf
|
||||
}
|
||||
|
||||
src_compile() {
|
||||
econf \
|
||||
--enable-paranoia \
|
||||
--sysconfdir /etc/dhcp \
|
||||
--with-cli-pid-file=/var/run/dhcp/dhclient.pid \
|
||||
--with-cli-lease-file=/var/lib/dhcp/dhclient.leases \
|
||||
--with-srv-pid-file=/var/run/dhcp/dhcpd.pid \
|
||||
--with-srv-lease-file=/var/lib/dhcp/dhcpd.leases \
|
||||
--with-relay-pid-file=/var/run/dhcp/dhcrelay.pid \
|
||||
$(use_enable ipv6 dhcpv6) \
|
||||
$(use_with ldap) \
|
||||
$(use_with ssl ldapcrypto) \
|
||||
|| die
|
||||
|
||||
emake || die "compile problem"
|
||||
}
|
||||
|
||||
src_install() {
|
||||
for installdir in includes tests common minires dst omapip client dhcpctl relay server; do
|
||||
cd "${S}/${installdir}"
|
||||
if [ "${installdir}" == client ]; then
|
||||
make install DESTDIR="${D}" exec_prefix="" || die
|
||||
else
|
||||
make install DESTDIR="${D}" exec_prefix="/usr" || die
|
||||
fi
|
||||
done
|
||||
|
||||
cd "${S}"
|
||||
|
||||
exeinto /sbin
|
||||
if use kernel_linux; then
|
||||
newexe "${S}"/client/scripts/linux dhclient-script
|
||||
else
|
||||
newexe "${S}"/client/scripts/freebsd dhclient-script
|
||||
fi
|
||||
|
||||
if use doc; then
|
||||
dodoc README RELNOTES doc/*
|
||||
use ldap && dodoc "contrib/ldap"/*.ldap
|
||||
fi
|
||||
insinto /etc/dhcp
|
||||
newins client/dhclient.conf dhclient.conf.sample
|
||||
keepdir /var/{lib,run}/dhcp
|
||||
keepdir /var/lib/dhclient
|
||||
|
||||
# Install our server files
|
||||
insinto /etc/dhcp
|
||||
newins server/dhcpd.conf dhcpd.conf.sample
|
||||
newinitd "${FILESDIR}"/dhcpd.init2 dhcpd
|
||||
newinitd "${FILESDIR}"/dhcrelay.init dhcrelay
|
||||
newconfd "${FILESDIR}"/dhcpd.conf dhcpd
|
||||
newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay
|
||||
|
||||
# install ldap files
|
||||
if use ldap; then
|
||||
insinto /etc/openldap/schema
|
||||
doins "contrib/ldap"/dhcp.*
|
||||
dosbin "contrib/ldap"/dhcpd-conf-to-ldap
|
||||
fi
|
||||
|
||||
|
||||
# We never want portage to own this file
|
||||
rm -f "${D}"/var/lib/dhcp/dhcpd.leases
|
||||
}
|
||||
|
||||
pkg_preinst() {
|
||||
enewgroup dhcp
|
||||
enewuser dhcp -1 -1 /var/lib/dhcp dhcp
|
||||
}
|
||||
|
||||
pkg_postinst() {
|
||||
chown -R dhcp:dhcp "${ROOT}"/var/{lib,run}/dhcp
|
||||
|
||||
if [[ -e "${ROOT}"/etc/init.d/dhcp ]] ; then
|
||||
ewarn
|
||||
ewarn "WARNING: The dhcp init script has been renamed to dhcpd"
|
||||
ewarn "/etc/init.d/dhcp and /etc/conf.d/dhcp need to be removed and"
|
||||
ewarn "and dhcp should be removed from the default runlevel"
|
||||
ewarn
|
||||
fi
|
||||
|
||||
einfo "You can edit /etc/conf.d/dhcpd to customize dhcp settings."
|
||||
einfo
|
||||
einfo "If you would like to run dhcpd in a chroot, simply configure the"
|
||||
einfo "DHCPD_CHROOT directory in /etc/conf.d/dhcpd and then run:"
|
||||
einfo " emerge --config =${PF}"
|
||||
}
|
||||
|
||||
pkg_config() {
|
||||
local CHROOT="$(
|
||||
sed -n -e 's/^[[:blank:]]\?DHCPD_CHROOT="*\([^#"]\+\)"*/\1/p' \
|
||||
"${ROOT}"/etc/conf.d/dhcpd
|
||||
)"
|
||||
|
||||
if [[ -z ${CHROOT} ]]; then
|
||||
eerror "CHROOT not defined in /etc/conf.d/dhcpd"
|
||||
return 1
|
||||
fi
|
||||
|
||||
CHROOT="${ROOT}/${CHROOT}"
|
||||
|
||||
if [[ -d ${CHROOT} ]] ; then
|
||||
ewarn "${CHROOT} already exists - aborting"
|
||||
return 0
|
||||
fi
|
||||
|
||||
ebegin "Setting up the chroot directory"
|
||||
mkdir -m 0755 -p "${CHROOT}/"{dev,etc,var/lib,var/run/dhcp}
|
||||
cp /etc/{localtime,resolv.conf} "${CHROOT}"/etc
|
||||
cp -R /etc/dhcp "${CHROOT}"/etc
|
||||
cp -R /var/lib/dhcp "${CHROOT}"/var/lib
|
||||
ln -s ../../var/lib/dhcp "${CHROOT}"/etc/dhcp/lib
|
||||
chown -R dhcp:dhcp "${CHROOT}"/var/{lib,run}/dhcp
|
||||
eend 0
|
||||
|
||||
local logger="$(best_version virtual/logger)"
|
||||
einfo "To enable logging from the dhcpd server, configure your"
|
||||
einfo "logger (${logger}) to listen on ${CHROOT}/dev/log"
|
||||
}
|
@ -1,205 +0,0 @@
|
||||
diff -uNr dhcp-4.0.0.ORIG/client/scripts/bsdos dhcp-4.0.0/client/scripts/bsdos
|
||||
--- dhcp-4.0.0.ORIG/client/scripts/bsdos 2008-09-01 13:22:40.000000000 +0100
|
||||
+++ dhcp-4.0.0/client/scripts/bsdos 2008-09-01 13:23:24.000000000 +0100
|
||||
@@ -95,6 +95,9 @@
|
||||
if [ x$new_interface_mtu != x ]; then
|
||||
mtu_arg="mtu $new_interface_mtu"
|
||||
fi
|
||||
+if [ x$IF_METRIC != x ]; then
|
||||
+ metric_arg="metric $IF_METRIC"
|
||||
+fi
|
||||
|
||||
if [ x$reason = xMEDIUM ]; then
|
||||
eval "ifconfig $interface $medium"
|
||||
@@ -156,7 +159,7 @@
|
||||
if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
|
||||
[ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
|
||||
eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \
|
||||
- $new_broadcast_arg $mtu_arg $medium"
|
||||
+ $new_broadcast_arg $mtu_arg $metric_arg $medium"
|
||||
route add $new_ip_address 127.1 >/dev/null 2>&1
|
||||
for router in $new_routers; do
|
||||
route add default $router >/dev/null 2>&1
|
||||
@@ -213,7 +216,7 @@
|
||||
route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1
|
||||
fi
|
||||
eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \
|
||||
- $new_broadcast_arg $mtu_arg $medium"
|
||||
+ $new_broadcast_arg $mtu_arg $metric_arg $medium"
|
||||
sleep 1
|
||||
if [ "$new_routers" != "" ]; then
|
||||
set $new_routers
|
||||
diff -uNr dhcp-4.0.0.ORIG/client/scripts/freebsd dhcp-4.0.0/client/scripts/freebsd
|
||||
--- dhcp-4.0.0.ORIG/client/scripts/freebsd 2008-09-01 13:22:40.000000000 +0100
|
||||
+++ dhcp-4.0.0/client/scripts/freebsd 2008-09-01 13:23:24.000000000 +0100
|
||||
@@ -139,6 +139,9 @@
|
||||
if [ x$new_interface_mtu != x ]; then
|
||||
mtu_arg="mtu $new_interface_mtu"
|
||||
fi
|
||||
+if [ x$IF_METRIC != x ]; then
|
||||
+ metric_arg="metric $IF_METRIC"
|
||||
+fi
|
||||
|
||||
if [ x$reason = xMEDIUM ]; then
|
||||
eval "ifconfig $interface $medium"
|
||||
@@ -200,7 +203,7 @@
|
||||
if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
|
||||
[ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
|
||||
eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \
|
||||
- $new_broadcast_arg $mtu_arg $medium"
|
||||
+ $new_broadcast_arg $mtu_arg $metric_arg $medium"
|
||||
$LOGGER "New IP Address ($interface): $new_ip_address"
|
||||
$LOGGER "New Subnet Mask ($interface): $new_subnet_mask"
|
||||
$LOGGER "New Broadcast Address ($interface): $new_broadcast_address"
|
||||
@@ -264,7 +267,7 @@
|
||||
route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1
|
||||
fi
|
||||
eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \
|
||||
- $new_broadcast_arg $mtu_arg $medium"
|
||||
+ $new_broadcast_arg $mtu_arg $metric_arg $medium"
|
||||
$LOGGER "New IP Address ($interface): $new_ip_address"
|
||||
$LOGGER "New Subnet Mask ($interface): $new_subnet_mask"
|
||||
$LOGGER "New Broadcast Address ($interface): $new_broadcast_address"
|
||||
diff -uNr dhcp-4.0.0.ORIG/client/scripts/linux dhcp-4.0.0/client/scripts/linux
|
||||
--- dhcp-4.0.0.ORIG/client/scripts/linux 2008-09-01 13:22:40.000000000 +0100
|
||||
+++ dhcp-4.0.0/client/scripts/linux 2008-09-01 13:26:19.000000000 +0100
|
||||
@@ -98,11 +98,6 @@
|
||||
fi
|
||||
fi
|
||||
|
||||
-release=`uname -r`
|
||||
-release=`expr $release : '\(.*\)\..*'`
|
||||
-relminor=`echo $release |sed -e 's/[0-9]*\.\([0-9][0-9]*\)\(\..*\)*$/\1/'`
|
||||
-relmajor=`echo $release |sed -e 's/\([0-9][0-9]*\)\..*$/\1/'`
|
||||
-
|
||||
###
|
||||
### DHCPv4 Handlers
|
||||
###
|
||||
@@ -125,6 +120,9 @@
|
||||
if [ x$new_interface_mtu != x ]; then
|
||||
mtu_arg="mtu $new_interface_mtu"
|
||||
fi
|
||||
+if [ x$IF_METRIC != x ]; then
|
||||
+ metric_arg="metric $IF_METRIC"
|
||||
+fi
|
||||
|
||||
if [ x$reason = xMEDIUM ]; then
|
||||
# Linux doesn't do mediums (ok, ok, media).
|
||||
@@ -136,15 +134,7 @@
|
||||
# Bring down alias interface. Its routes will disappear too.
|
||||
ifconfig $interface:0- inet 0
|
||||
fi
|
||||
- if [ $relmajor -lt 2 ] || ( [ $relmajor -eq 2 ] && [ $relminor -eq 0 ] )
|
||||
- then
|
||||
- ifconfig $interface inet 0.0.0.0 netmask 0.0.0.0 \
|
||||
- broadcast 255.255.255.255 up
|
||||
- # Add route to make broadcast work. Do not omit netmask.
|
||||
- route add default dev $interface netmask 0.0.0.0
|
||||
- else
|
||||
- ifconfig $interface 0 up
|
||||
- fi
|
||||
+ ifconfig $interface 0 up
|
||||
|
||||
# We need to give the kernel some time to get the interface up.
|
||||
sleep 1
|
||||
@@ -186,12 +176,14 @@
|
||||
ifconfig $interface inet $new_ip_address $new_subnet_arg \
|
||||
$new_broadcast_arg $mtu_arg
|
||||
# Add a network route to the computed network address.
|
||||
- if [ $relmajor -lt 2 ] || \
|
||||
- ( [ $relmajor -eq 2 ] && [ $relminor -eq 0 ] ); then
|
||||
- route add -net $new_network_number $new_subnet_arg dev $interface
|
||||
+ if [ x$IF_METRIC != x ] && [ x$IF_METRIC != x0 ]; then
|
||||
+ route del -net $new_network_number $new_subnet_arg \
|
||||
+ dev $interface
|
||||
+ route add -net $new_network_number $new_subnet_arg $metric_arg \
|
||||
+ dev $interface
|
||||
fi
|
||||
for router in $new_routers; do
|
||||
- route add default gw $router
|
||||
+ route add default gw $router $metric_arg dev $interface
|
||||
done
|
||||
fi
|
||||
if [ x$new_ip_address != x$alias_ip_address ] && [ x$alias_ip_address != x ];
|
||||
@@ -234,12 +226,15 @@
|
||||
ifconfig $interface:0 inet $alias_ip_address $alias_subnet_arg
|
||||
route add -host $alias_ip_address dev $interface:0
|
||||
fi
|
||||
- if [ $relmajor -lt 2 ] || \
|
||||
- ( [ $relmajor -eq 2 ] && [ $relminor -eq 0 ] ); then
|
||||
- route add -net $new_network_number
|
||||
+ # Add a network route to the computed network address.
|
||||
+ if [ x$IF_METRIC != x ] && [ x$IF_METRIC != x0 ]; then
|
||||
+ route del -net $new_network_number $new_subnet_arg \
|
||||
+ dev $interface
|
||||
+ route add -net $new_network_number $new_subnet_arg $metric_arg \
|
||||
+ dev $interface
|
||||
fi
|
||||
for router in $new_routers; do
|
||||
- route add default gw $router
|
||||
+ route add default gw $router $metric_arg dev $interface
|
||||
done
|
||||
make_resolv_conf
|
||||
exit_with_hooks 0
|
||||
diff -uNr dhcp-4.0.0.ORIG/client/scripts/netbsd dhcp-4.0.0/client/scripts/netbsd
|
||||
--- dhcp-4.0.0.ORIG/client/scripts/netbsd 2008-09-01 13:22:40.000000000 +0100
|
||||
+++ dhcp-4.0.0/client/scripts/netbsd 2008-09-01 13:23:33.000000000 +0100
|
||||
@@ -95,6 +95,9 @@
|
||||
if [ x$new_interface_mtu != x ]; then
|
||||
mtu_arg="mtu $new_interface_mtu"
|
||||
fi
|
||||
+if [ x$IF_METRIC != x ]; then
|
||||
+ metric_arg="metric $IF_METRIC"
|
||||
+fi
|
||||
|
||||
if [ x$reason = xMEDIUM ]; then
|
||||
eval "ifconfig $interface $medium"
|
||||
@@ -156,7 +159,7 @@
|
||||
if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
|
||||
[ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
|
||||
eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \
|
||||
- $new_broadcast_arg $mtu_arg $medium"
|
||||
+ $new_broadcast_arg $mtu_arg $metric_arg $medium"
|
||||
route add $new_ip_address 127.1 >/dev/null 2>&1
|
||||
for router in $new_routers; do
|
||||
route add default $router >/dev/null 2>&1
|
||||
@@ -213,7 +216,7 @@
|
||||
route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1
|
||||
fi
|
||||
eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \
|
||||
- $new_broadcast_arg $mtu_arg $medium"
|
||||
+ $new_broadcast_arg $mtu_arg $metric_arg $medium"
|
||||
sleep 1
|
||||
if [ "$new_routers" != "" ]; then
|
||||
set $new_routers
|
||||
diff -uNr dhcp-4.0.0.ORIG/client/scripts/solaris dhcp-4.0.0/client/scripts/solaris
|
||||
--- dhcp-4.0.0.ORIG/client/scripts/solaris 2008-09-01 13:22:40.000000000 +0100
|
||||
+++ dhcp-4.0.0/client/scripts/solaris 2008-09-01 13:23:33.000000000 +0100
|
||||
@@ -78,6 +78,9 @@
|
||||
if [ x$new_interface_mtu != x ]; then
|
||||
mtu_arg="mtu $new_interface_mtu"
|
||||
fi
|
||||
+if [ x$IF_METRIC != x ]; then
|
||||
+ metric_arg="metric $IF_METRIC"
|
||||
+fi
|
||||
|
||||
ifconfig=/sbin/ifconfig
|
||||
|
||||
@@ -140,7 +143,7 @@
|
||||
if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
|
||||
[ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
|
||||
eval "$ifconfig $interface inet $new_ip_address $new_netmask_arg \
|
||||
- $new_broadcast_arg $mtu_arg $medium"
|
||||
+ $new_broadcast_arg $mtu_arg $metric_arg $medium"
|
||||
route add $new_ip_address 127.1 1 >/dev/null 2>&1
|
||||
for router in $new_routers; do
|
||||
route add default $router 1 >/dev/null 2>&1
|
||||
@@ -181,7 +184,7 @@
|
||||
route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1
|
||||
fi
|
||||
eval "$ifconfig $interface inet $new_ip_address $new_netmask_arg \
|
||||
- $new_broadcast_arg $mtu_arg $medium"
|
||||
+ $new_broadcast_arg $mtu_arg $metric_arg $medium"
|
||||
sleep 1
|
||||
set $new_routers
|
||||
if ping -s -n -I 1 $1 64 1; then
|
@ -1,216 +0,0 @@
|
||||
diff -uNr dhcp-4.0.0.ORIG/client/clparse.c dhcp-4.0.0/client/clparse.c
|
||||
--- dhcp-4.0.0.ORIG/client/clparse.c 2008-09-01 11:38:51.000000000 +0100
|
||||
+++ dhcp-4.0.0/client/clparse.c 2008-09-01 11:48:17.000000000 +0100
|
||||
@@ -37,7 +37,7 @@
|
||||
|
||||
struct client_config top_level_config;
|
||||
|
||||
-#define NUM_DEFAULT_REQUESTED_OPTS 9
|
||||
+#define NUM_DEFAULT_REQUESTED_OPTS 10
|
||||
struct option *default_requested_options[NUM_DEFAULT_REQUESTED_OPTS + 1];
|
||||
|
||||
static void parse_client_default_duid(struct parse *cfile);
|
||||
@@ -98,15 +98,20 @@
|
||||
dhcp_universe.code_hash, &code, 0, MDL);
|
||||
|
||||
/* 8 */
|
||||
- code = D6O_NAME_SERVERS;
|
||||
+ code = DHO_NTP_SERVERS;
|
||||
option_code_hash_lookup(&default_requested_options[7],
|
||||
- dhcpv6_universe.code_hash, &code, 0, MDL);
|
||||
+ dhcp_universe.code_hash, &code, 0, MDL);
|
||||
|
||||
/* 9 */
|
||||
- code = D6O_DOMAIN_SEARCH;
|
||||
+ code = D6O_NAME_SERVERS;
|
||||
option_code_hash_lookup(&default_requested_options[8],
|
||||
dhcpv6_universe.code_hash, &code, 0, MDL);
|
||||
|
||||
+ /* 10 */
|
||||
+ code = D6O_DOMAIN_SEARCH;
|
||||
+ option_code_hash_lookup(&default_requested_options[9],
|
||||
+ dhcpv6_universe.code_hash, &code, 0, MDL);
|
||||
+
|
||||
for (code = 0 ; code < NUM_DEFAULT_REQUESTED_OPTS ; code++) {
|
||||
if (default_requested_options[code] == NULL)
|
||||
log_fatal("Unable to find option definition for "
|
||||
diff -uNr dhcp-4.0.0.ORIG/client/scripts/bsdos dhcp-4.0.0/client/scripts/bsdos
|
||||
--- dhcp-4.0.0.ORIG/client/scripts/bsdos 2008-09-01 11:38:51.000000000 +0100
|
||||
+++ dhcp-4.0.0/client/scripts/bsdos 2008-09-01 11:39:30.000000000 +0100
|
||||
@@ -29,6 +29,26 @@
|
||||
|
||||
mv /etc/resolv.conf.dhclient6 /etc/resolv.conf
|
||||
fi
|
||||
+ # If we're making confs, may as well make an ntp.conf too
|
||||
+ make_ntp_conf
|
||||
+}
|
||||
+
|
||||
+make_ntp_conf() {
|
||||
+ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then
|
||||
+ if [ x$new_ntp_servers != x ]; then
|
||||
+ conf="# Generated by dhclient for interface $interface\n"
|
||||
+ conf="${conf}restrict default noquery notrust nomodify\n"
|
||||
+ conf="${conf}restrict 127.0.0.1\n"
|
||||
+ for ntpserver in $new_ntp_servers; do
|
||||
+ conf="${conf}restrict $ntpserver nomodify notrap noquery\n"
|
||||
+ conf="${conf}server $ntpserver\n"
|
||||
+ done
|
||||
+ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n"
|
||||
+ conf="${conf}logfile /var/log/ntp.log\n"
|
||||
+ printf "${conf}" > /etc/ntp.conf
|
||||
+ chmod 644 /etc/ntp.conf
|
||||
+ fi
|
||||
+ fi
|
||||
}
|
||||
|
||||
# Must be used on exit. Invokes the local dhcp client exit hooks, if any.
|
||||
diff -uNr dhcp-4.0.0.ORIG/client/scripts/freebsd dhcp-4.0.0/client/scripts/freebsd
|
||||
--- dhcp-4.0.0.ORIG/client/scripts/freebsd 2008-09-01 11:38:51.000000000 +0100
|
||||
+++ dhcp-4.0.0/client/scripts/freebsd 2008-09-01 11:39:30.000000000 +0100
|
||||
@@ -73,6 +73,26 @@
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
+ # If we're making confs, may as well make an ntp.conf too
|
||||
+ make_ntp_conf
|
||||
+}
|
||||
+
|
||||
+make_ntp_conf() {
|
||||
+ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then
|
||||
+ if [ "x$new_ntp_servers" != x ]; then
|
||||
+ conf="# Generated by dhclient for interface $interface\n"
|
||||
+ conf="${conf}restrict default noquery notrust nomodify\n"
|
||||
+ conf="${conf}restrict 127.0.0.1\n"
|
||||
+ for ntpserver in $new_ntp_servers; do
|
||||
+ conf="${conf}restrict $ntpserver nomodify notrap noquery\n"
|
||||
+ conf="${conf}server $ntpserver\n"
|
||||
+ done
|
||||
+ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n"
|
||||
+ conf="${conf}logfile /var/log/ntp.log\n"
|
||||
+ printf "${conf}" > /etc/ntp.conf
|
||||
+ chmod 644 /etc/ntp.conf
|
||||
+ fi
|
||||
+ fi
|
||||
}
|
||||
|
||||
# Must be used on exit. Invokes the local dhcp client exit hooks, if any.
|
||||
diff -uNr dhcp-4.0.0.ORIG/client/scripts/linux dhcp-4.0.0/client/scripts/linux
|
||||
--- dhcp-4.0.0.ORIG/client/scripts/linux 2008-09-01 11:38:51.000000000 +0100
|
||||
+++ dhcp-4.0.0/client/scripts/linux 2008-09-01 11:39:30.000000000 +0100
|
||||
@@ -55,6 +55,26 @@
|
||||
|
||||
mv /etc/resolv.conf.dhclient6 /etc/resolv.conf
|
||||
fi
|
||||
+ # If we're making confs, may as well make an ntp.conf too
|
||||
+ make_ntp_conf
|
||||
+}
|
||||
+
|
||||
+make_ntp_conf() {
|
||||
+ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then
|
||||
+ if [ "x$new_ntp_servers" != x ]; then
|
||||
+ conf="# Generated by dhclient for interface $interface\n"
|
||||
+ conf="${conf}restrict default noquery notrust nomodify\n"
|
||||
+ conf="${conf}restrict 127.0.0.1\n"
|
||||
+ for ntpserver in $new_ntp_servers; do
|
||||
+ conf="${conf}restrict $ntpserver nomodify notrap noquery\n"
|
||||
+ conf="${conf}server $ntpserver\n"
|
||||
+ done
|
||||
+ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n"
|
||||
+ conf="${conf}logfile /var/log/ntp.log\n"
|
||||
+ printf "${conf}" > /etc/ntp.conf
|
||||
+ chmod 644 /etc/ntp.conf
|
||||
+ fi
|
||||
+ fi
|
||||
}
|
||||
|
||||
# Must be used on exit. Invokes the local dhcp client exit hooks, if any.
|
||||
diff -uNr dhcp-4.0.0.ORIG/client/scripts/netbsd dhcp-4.0.0/client/scripts/netbsd
|
||||
--- dhcp-4.0.0.ORIG/client/scripts/netbsd 2008-09-01 11:38:51.000000000 +0100
|
||||
+++ dhcp-4.0.0/client/scripts/netbsd 2008-09-01 11:39:30.000000000 +0100
|
||||
@@ -29,6 +29,26 @@
|
||||
|
||||
mv /etc/resolv.conf.dhclient6 /etc/resolv.conf
|
||||
fi
|
||||
+ # If we're making confs, may as well make an ntp.conf too
|
||||
+ make_ntp_conf
|
||||
+}
|
||||
+
|
||||
+make_ntp_conf() {
|
||||
+ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then
|
||||
+ if [ "x$new_ntp_servers" != x ]; then
|
||||
+ conf="# Generated by dhclient for interface $interface\n"
|
||||
+ conf="${conf}restrict default noquery notrust nomodify\n"
|
||||
+ conf="${conf}restrict 127.0.0.1\n"
|
||||
+ for ntpserver in $new_ntp_servers; do
|
||||
+ conf="${conf}restrict $ntpserver nomodify notrap noquery\n"
|
||||
+ conf="${conf}server $ntpserver\n"
|
||||
+ done
|
||||
+ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n"
|
||||
+ conf="${conf}logfile /var/log/ntp.log\n"
|
||||
+ printf "${conf}" > /etc/ntp.conf
|
||||
+ chmod 644 /etc/ntp.conf
|
||||
+ fi
|
||||
+ fi
|
||||
}
|
||||
|
||||
# Must be used on exit. Invokes the local dhcp client exit hooks, if any.
|
||||
diff -uNr dhcp-4.0.0.ORIG/client/scripts/openbsd dhcp-4.0.0/client/scripts/openbsd
|
||||
--- dhcp-4.0.0.ORIG/client/scripts/openbsd 2008-09-01 11:38:51.000000000 +0100
|
||||
+++ dhcp-4.0.0/client/scripts/openbsd 2008-09-01 11:39:30.000000000 +0100
|
||||
@@ -29,6 +29,26 @@
|
||||
|
||||
mv /etc/resolv.conf.dhclient6 /etc/resolv.conf
|
||||
fi
|
||||
+ # If we're making confs, may as well make an ntp.conf too
|
||||
+ make_ntp_conf
|
||||
+}
|
||||
+
|
||||
+make_ntp_conf() {
|
||||
+ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then
|
||||
+ if [ "x$new_ntp_servers" != x ]; then
|
||||
+ conf="# Generated by dhclient for interface $interface\n"
|
||||
+ conf="${conf}restrict default noquery notrust nomodify\n"
|
||||
+ conf="${conf}restrict 127.0.0.1\n"
|
||||
+ for ntpserver in $new_ntp_servers; do
|
||||
+ conf="${conf}restrict $ntpserver nomodify notrap noquery\n"
|
||||
+ conf="${conf}server $ntpserver\n"
|
||||
+ done
|
||||
+ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n"
|
||||
+ conf="${conf}logfile /var/log/ntp.log\n"
|
||||
+ printf "${conf}" > /etc/ntp.conf
|
||||
+ chmod 644 /etc/ntp.conf
|
||||
+ fi
|
||||
+ fi
|
||||
}
|
||||
|
||||
# Must be used on exit. Invokes the local dhcp client exit hooks, if any.
|
||||
diff -uNr dhcp-4.0.0.ORIG/client/scripts/solaris dhcp-4.0.0/client/scripts/solaris
|
||||
--- dhcp-4.0.0.ORIG/client/scripts/solaris 2008-09-01 11:38:51.000000000 +0100
|
||||
+++ dhcp-4.0.0/client/scripts/solaris 2008-09-01 11:39:30.000000000 +0100
|
||||
@@ -17,6 +17,26 @@
|
||||
|
||||
mv /etc/resolv.conf.dhclient /etc/resolv.conf
|
||||
fi
|
||||
+ # If we're making confs, may as well make an ntp.conf too
|
||||
+ make_ntp_conf
|
||||
+}
|
||||
+
|
||||
+make_ntp_conf() {
|
||||
+ if [ x$PEER_NTP = x ] || [ x$PEER_NTP = xyes ]; then
|
||||
+ if [ "x$new_ntp_servers" != x ]; then
|
||||
+ conf="# Generated by dhclient for interface $interface\n"
|
||||
+ conf="${conf}restrict default noquery notrust nomodify\n"
|
||||
+ conf="${conf}restrict 127.0.0.1\n"
|
||||
+ for ntpserver in $new_ntp_servers; do
|
||||
+ conf="${conf}restrict $ntpserver nomodify notrap noquery\n"
|
||||
+ conf="${conf}server $ntpserver\n"
|
||||
+ done
|
||||
+ conf="${conf}driftfile /var/lib/ntp/ntp.drift\n"
|
||||
+ conf="${conf}logfile /var/log/ntp.log\n"
|
||||
+ printf "${conf}" > /etc/ntp.conf
|
||||
+ chmod 644 /etc/ntp.conf
|
||||
+ fi
|
||||
+ fi
|
||||
}
|
||||
|
||||
# Must be used on exit. Invokes the local dhcp client exit hooks, if any.
|
@ -1,390 +0,0 @@
|
||||
diff -ur a/client/scripts/bsdos b/client/scripts/bsdos
|
||||
--- a/client/scripts/bsdos 2008-09-01 14:41:00.000000000 +0100
|
||||
+++ b/client/scripts/bsdos 2008-09-01 14:57:33.000000000 +0100
|
||||
@@ -1,34 +1,41 @@
|
||||
#!/bin/sh
|
||||
|
||||
make_resolv_conf() {
|
||||
+ if [ x"$PEER_DNS" != x ] && [ x$"PEER_DNS" != xyes ]; then
|
||||
+ return 0
|
||||
+ fi
|
||||
+ local conf=
|
||||
if [ x"$new_domain_name_servers" != x ]; then
|
||||
- cat /dev/null > /etc/resolv.conf.dhclient
|
||||
if [ "x$new_domain_search" != x ]; then
|
||||
- echo search $new_domain_search >> /etc/resolv.conf.dhclient
|
||||
+ conf="${conf}search ${new_domain_search}\n"
|
||||
elif [ "x$new_domain_name" != x ]; then
|
||||
# Note that the DHCP 'Domain Name Option' is really just a domain
|
||||
# name, and that this practice of using the domain name option as
|
||||
# a search path is both nonstandard and deprecated.
|
||||
- echo search $new_domain_name >> /etc/resolv.conf.dhclient
|
||||
+ conf="${conf}search ${new_domain_name}\n"
|
||||
fi
|
||||
for nameserver in $new_domain_name_servers; do
|
||||
- echo nameserver $nameserver >> /etc/resolv.conf.dhclient
|
||||
+ conf="${conf}nameserver ${nameserver}\n"
|
||||
done
|
||||
-
|
||||
- mv /etc/resolv.conf.dhclient /etc/resolv.conf
|
||||
elif [ "x${new_dhcp6_name_servers}" != x ] ; then
|
||||
- cat /dev/null > /etc/resolv.conf.dhclient6
|
||||
- chmod 644 /etc/resolv.conf.dhclient6
|
||||
-
|
||||
if [ "x${new_dhcp6_domain_search}" != x ] ; then
|
||||
- echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6
|
||||
+ conf="${conf}search ${new_dhcp6_domain_search}\n"
|
||||
fi
|
||||
for nameserver in ${new_dhcp6_name_servers} ; do
|
||||
- echo nameserver ${nameserver} >> /etc/resolv.conf.dhclient6
|
||||
+ conf="${conf}nameserver ${nameserver}\n"
|
||||
done
|
||||
+ fi
|
||||
|
||||
- mv /etc/resolv.conf.dhclient6 /etc/resolv.conf
|
||||
+ if [ x"$conf" != x ]; then
|
||||
+ conf="# Generated by dhclient or interface $interface\n${conf}"
|
||||
+ if type resolvconf >/dev/null 2>&1; then
|
||||
+ printf "${conf}" | resolvconf -a $interface
|
||||
+ else
|
||||
+ printf "${conf}" > /etc/resolv.conf
|
||||
+ chmod 644 /etc/resolv.conf
|
||||
+ fi
|
||||
fi
|
||||
+
|
||||
# If we're making confs, may as well make an ntp.conf too
|
||||
make_ntp_conf
|
||||
}
|
||||
diff -ur a/client/scripts/freebsd b/client/scripts/freebsd
|
||||
--- a/client/scripts/freebsd 2008-09-01 14:41:00.000000000 +0100
|
||||
+++ b/client/scripts/freebsd 2008-09-01 15:00:18.000000000 +0100
|
||||
@@ -11,68 +11,41 @@
|
||||
fi
|
||||
|
||||
make_resolv_conf() {
|
||||
+ if [ x"$PEER_DNS" != x ] && [ x$"PEER_DNS" != xyes ]; then
|
||||
+ return 0
|
||||
+ fi
|
||||
+ local conf=
|
||||
if [ x"$new_domain_name_servers" != x ]; then
|
||||
- ( cat /dev/null > /etc/resolv.conf.dhclient )
|
||||
- exit_status=$?
|
||||
- if [ $exit_status -ne 0 ]; then
|
||||
- $LOGGER "Unable to create /etc/resolv.conf.dhclient: Error $exit_status"
|
||||
- else
|
||||
- if [ "x$new_domain_search" != x ]; then
|
||||
- ( echo search $new_domain_search >> /etc/resolv.conf.dhclient )
|
||||
- exit_status=$?
|
||||
- elif [ "x$new_domain_name" != x ]; then
|
||||
- # Note that the DHCP 'Domain Name Option' is really just a domain
|
||||
- # name, and that this practice of using the domain name option as
|
||||
- # a search path is both nonstandard and deprecated.
|
||||
- ( echo search $new_domain_name >> /etc/resolv.conf.dhclient )
|
||||
- exit_status=$?
|
||||
- fi
|
||||
- for nameserver in $new_domain_name_servers; do
|
||||
- if [ $exit_status -ne 0 ]; then
|
||||
- break
|
||||
- fi
|
||||
- ( echo nameserver $nameserver >>/etc/resolv.conf.dhclient )
|
||||
- exit_status=$?
|
||||
- done
|
||||
-
|
||||
- # If there were no errors, attempt to mv the new file into place.
|
||||
- if [ $exit_status -eq 0 ]; then
|
||||
- ( mv /etc/resolv.conf.dhclient /etc/resolv.conf )
|
||||
- exit_status=$?
|
||||
- fi
|
||||
-
|
||||
- if [ $exit_status -ne 0 ]; then
|
||||
- $LOGGER "Error while writing new /etc/resolv.conf."
|
||||
- fi
|
||||
+ if [ "x$new_domain_search" != x ]; then
|
||||
+ conf="${conf}search ${new_domain_search}\n"
|
||||
+ elif [ "x$new_domain_name" != x ]; then
|
||||
+ # Note that the DHCP 'Domain Name Option' is really just a domain
|
||||
+ # name, and that this practice of using the domain name option as
|
||||
+ # a search path is both nonstandard and deprecated.
|
||||
+ conf="${conf}search ${new_domain_name}\n"
|
||||
fi
|
||||
+ for nameserver in $new_domain_name_servers; do
|
||||
+ conf="${conf}nameserver ${nameserver}\n"
|
||||
+ done
|
||||
elif [ "x${new_dhcp6_name_servers}" != x ] ; then
|
||||
- ( cat /dev/null > /etc/resolv.conf.dhclient6 )
|
||||
- exit_status=$?
|
||||
- if [ $exit_status -ne 0 ] ; then
|
||||
- $LOGGER "Unable to create /etc/resolv.conf.dhclient6: Error $exit_status"
|
||||
- else
|
||||
- if [ "x${new_dhcp6_domain_search}" != x ] ; then
|
||||
- ( echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6 )
|
||||
- exit_status=$?
|
||||
- fi
|
||||
- for nameserver in ${new_dhcp6_name_servers} ; do
|
||||
- if [ $exit_status -ne 0 ] ; then
|
||||
- break
|
||||
- fi
|
||||
- ( echo nameserver ${nameserver} >> /etc/resolv.conf.dhclient6 )
|
||||
- exit_status=$?
|
||||
- done
|
||||
-
|
||||
- if [ $exit_status -eq 0 ] ; then
|
||||
- ( mv /etc/resolv.conf.dhclient6 /etc/resolv.conf )
|
||||
- exit_status=$?
|
||||
- fi
|
||||
+ if [ "x${new_dhcp6_domain_search}" != x ] ; then
|
||||
+ conf="${conf}search ${new_dhcp6_domain_search}\n"
|
||||
+ fi
|
||||
+ for nameserver in ${new_dhcp6_name_servers} ; do
|
||||
+ conf="${conf}nameserver ${nameserver}\n"
|
||||
+ done
|
||||
+ fi
|
||||
|
||||
- if [ $exit_status -ne 0 ] ; then
|
||||
- $LOGGER "Error while writing new /etc/resolv.conf."
|
||||
- fi
|
||||
+ if [ x"$conf" != x ]; then
|
||||
+ conf="# Generated by dhclient or interface $interface\n${conf}"
|
||||
+ if type resolvconf >/dev/null 2>&1; then
|
||||
+ printf "${conf}" | resolvconf -a $interface
|
||||
+ else
|
||||
+ printf "${conf}" > /etc/resolv.conf
|
||||
+ chmod 644 /etc/resolv.conf
|
||||
fi
|
||||
fi
|
||||
+
|
||||
# If we're making confs, may as well make an ntp.conf too
|
||||
make_ntp_conf
|
||||
}
|
||||
diff -ur a/client/scripts/linux b/client/scripts/linux
|
||||
--- a/client/scripts/linux 2008-09-01 14:41:00.000000000 +0100
|
||||
+++ b/client/scripts/linux 2008-09-01 14:58:09.000000000 +0100
|
||||
@@ -26,35 +26,41 @@
|
||||
ip=/sbin/ip
|
||||
|
||||
make_resolv_conf() {
|
||||
+ if [ x"$PEER_DNS" != x ] && [ x$"PEER_DNS" != xyes ]; then
|
||||
+ return 0
|
||||
+ fi
|
||||
+ local conf=
|
||||
if [ x"$new_domain_name_servers" != x ]; then
|
||||
- cat /dev/null > /etc/resolv.conf.dhclient
|
||||
- chmod 644 /etc/resolv.conf.dhclient
|
||||
- if [ x"$new_domain_search" != x ]; then
|
||||
- echo search $new_domain_search >> /etc/resolv.conf.dhclient
|
||||
- elif [ x"$new_domain_name" != x ]; then
|
||||
+ if [ "x$new_domain_search" != x ]; then
|
||||
+ conf="${conf}search ${new_domain_search}\n"
|
||||
+ elif [ "x$new_domain_name" != x ]; then
|
||||
# Note that the DHCP 'Domain Name Option' is really just a domain
|
||||
# name, and that this practice of using the domain name option as
|
||||
# a search path is both nonstandard and deprecated.
|
||||
- echo search $new_domain_name >> /etc/resolv.conf.dhclient
|
||||
+ conf="${conf}search ${new_domain_name}\n"
|
||||
fi
|
||||
for nameserver in $new_domain_name_servers; do
|
||||
- echo nameserver $nameserver >>/etc/resolv.conf.dhclient
|
||||
+ conf="${conf}nameserver ${nameserver}\n"
|
||||
done
|
||||
-
|
||||
- mv /etc/resolv.conf.dhclient /etc/resolv.conf
|
||||
elif [ "x${new_dhcp6_name_servers}" != x ] ; then
|
||||
- cat /dev/null > /etc/resolv.conf.dhclient6
|
||||
- chmod 644 /etc/resolv.conf.dhclient6
|
||||
-
|
||||
if [ "x${new_dhcp6_domain_search}" != x ] ; then
|
||||
- echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6
|
||||
+ conf="${conf}search ${new_dhcp6_domain_search}\n"
|
||||
fi
|
||||
for nameserver in ${new_dhcp6_name_servers} ; do
|
||||
- echo nameserver ${nameserver} >> /etc/resolv.conf.dhclient6
|
||||
+ conf="${conf}nameserver ${nameserver}\n"
|
||||
done
|
||||
+ fi
|
||||
|
||||
- mv /etc/resolv.conf.dhclient6 /etc/resolv.conf
|
||||
+ if [ x"$conf" != x ]; then
|
||||
+ conf="# Generated by dhclient or interface $interface\n${conf}"
|
||||
+ if type resolvconf >/dev/null 2>&1; then
|
||||
+ printf "${conf}" | resolvconf -a $interface
|
||||
+ else
|
||||
+ printf "${conf}" > /etc/resolv.conf
|
||||
+ chmod 644 /etc/resolv.conf
|
||||
+ fi
|
||||
fi
|
||||
+
|
||||
# If we're making confs, may as well make an ntp.conf too
|
||||
make_ntp_conf
|
||||
}
|
||||
diff -ur a/client/scripts/netbsd b/client/scripts/netbsd
|
||||
--- a/client/scripts/netbsd 2008-09-01 14:41:00.000000000 +0100
|
||||
+++ b/client/scripts/netbsd 2008-09-01 14:58:40.000000000 +0100
|
||||
@@ -1,34 +1,41 @@
|
||||
#!/bin/sh
|
||||
|
||||
make_resolv_conf() {
|
||||
- if [ "x$new_domain_name" != x ] && [ x"$new_domain_name_servers" != x ]; then
|
||||
- cat /dev/null > /etc/resolv.conf.dhclient
|
||||
- if [ "x$new_domain_search != x ]; then
|
||||
- echo search $new_domain_search >> /etc/resolv.conf.dhclient
|
||||
- elif [ "x$new_domain_name != x ]; then
|
||||
+ if [ x"$PEER_DNS" != x ] && [ x$"PEER_DNS" != xyes ]; then
|
||||
+ return 0
|
||||
+ fi
|
||||
+ local conf=
|
||||
+ if [ x"$new_domain_name_servers" != x ]; then
|
||||
+ if [ "x$new_domain_search" != x ]; then
|
||||
+ conf="${conf}search ${new_domain_search}\n"
|
||||
+ elif [ "x$new_domain_name" != x ]; then
|
||||
# Note that the DHCP 'Domain Name Option' is really just a domain
|
||||
# name, and that this practice of using the domain name option as
|
||||
# a search path is both nonstandard and deprecated.
|
||||
- echo search $new_domain_name >> /etc/resolv.conf.dhclient
|
||||
+ conf="${conf}search ${new_domain_name}\n"
|
||||
fi
|
||||
for nameserver in $new_domain_name_servers; do
|
||||
- echo nameserver $nameserver >>/etc/resolv.conf.dhclient
|
||||
+ conf="${conf}nameserver ${nameserver}\n"
|
||||
done
|
||||
-
|
||||
- mv /etc/resolv.conf.dhclient /etc/resolv.conf
|
||||
elif [ "x${new_dhcp6_name_servers}" != x ] ; then
|
||||
- cat /dev/null > /etc/resolv.conf.dhclient6
|
||||
- chmod 644 /etc/resolv.conf.dhclient6
|
||||
-
|
||||
if [ "x${new_dhcp6_domain_search}" != x ] ; then
|
||||
- echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6
|
||||
+ conf="${conf}search ${new_dhcp6_domain_search}\n"
|
||||
fi
|
||||
for nameserver in ${new_dhcp6_name_servers} ; do
|
||||
- echo nameserver ${nameserver} >> /etc/resolv.conf.dhclient6
|
||||
+ conf="${conf}nameserver ${nameserver}\n"
|
||||
done
|
||||
+ fi
|
||||
|
||||
- mv /etc/resolv.conf.dhclient6 /etc/resolv.conf
|
||||
+ if [ x"$conf" != x ]; then
|
||||
+ conf="# Generated by dhclient or interface $interface\n${conf}"
|
||||
+ if type resolvconf >/dev/null 2>&1; then
|
||||
+ printf "${conf}" | resolvconf -a $interface
|
||||
+ else
|
||||
+ printf "${conf}" > /etc/resolv.conf
|
||||
+ chmod 644 /etc/resolv.conf
|
||||
+ fi
|
||||
fi
|
||||
+
|
||||
# If we're making confs, may as well make an ntp.conf too
|
||||
make_ntp_conf
|
||||
}
|
||||
diff -ur a/client/scripts/openbsd b/client/scripts/openbsd
|
||||
--- a/client/scripts/openbsd 2008-09-01 14:41:00.000000000 +0100
|
||||
+++ b/client/scripts/openbsd 2008-09-01 14:59:12.000000000 +0100
|
||||
@@ -1,34 +1,41 @@
|
||||
#!/bin/sh
|
||||
|
||||
make_resolv_conf() {
|
||||
- if x"$new_domain_name_servers" != x ]; then
|
||||
- cat /dev/null > /etc/resolv.conf.dhclient
|
||||
- if [ x"$new_domain_search" != x ]; then
|
||||
- echo search $new_domain_search >> /etc/resolv.conf.dhclient
|
||||
- elif [ x"$new_domain_name" != x ]; then
|
||||
+ if [ x"$PEER_DNS" != x ] && [ x$"PEER_DNS" != xyes ]; then
|
||||
+ return 0
|
||||
+ fi
|
||||
+ local conf=
|
||||
+ if [ x"$new_domain_name_servers" != x ]; then
|
||||
+ if [ "x$new_domain_search" != x ]; then
|
||||
+ conf="${conf}search ${new_domain_search}\n"
|
||||
+ elif [ "x$new_domain_name" != x ]; then
|
||||
# Note that the DHCP 'Domain Name Option' is really just a domain
|
||||
# name, and that this practice of using the domain name option as
|
||||
# a search path is both nonstandard and deprecated.
|
||||
- echo search $new_domain_name >> /etc/resolv.conf.dhclient
|
||||
+ conf="${conf}search ${new_domain_name}\n"
|
||||
fi
|
||||
for nameserver in $new_domain_name_servers; do
|
||||
- echo nameserver $nameserver >>/etc/resolv.conf.dhclient
|
||||
+ conf="${conf}nameserver ${nameserver}\n"
|
||||
done
|
||||
-
|
||||
- mv /etc/ersolv.conf.dhclient /etc/resolv.conf
|
||||
elif [ "x${new_dhcp6_name_servers}" != x ] ; then
|
||||
- cat /dev/null > /etc/resolv.conf.dhclient6
|
||||
- chmod 644 /etc/resolv.conf.dhclient6
|
||||
-
|
||||
if [ "x${new_dhcp6_domain_search}" != x ] ; then
|
||||
- echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6
|
||||
+ conf="${conf}search ${new_dhcp6_domain_search}\n"
|
||||
fi
|
||||
for nameserver in ${new_dhcp6_name_servers} ; do
|
||||
- echo nameserver ${nameserver} >> /etc/resolv.conf.dhclient6
|
||||
+ conf="${conf}nameserver ${nameserver}\n"
|
||||
done
|
||||
+ fi
|
||||
|
||||
- mv /etc/resolv.conf.dhclient6 /etc/resolv.conf
|
||||
+ if [ x"$conf" != x ]; then
|
||||
+ conf="# Generated by dhclient or interface $interface\n${conf}"
|
||||
+ if type resolvconf >/dev/null 2>&1; then
|
||||
+ printf "${conf}" | resolvconf -a $interface
|
||||
+ else
|
||||
+ printf "${conf}" > /etc/resolv.conf
|
||||
+ chmod 644 /etc/resolv.conf
|
||||
+ fi
|
||||
fi
|
||||
+
|
||||
# If we're making confs, may as well make an ntp.conf too
|
||||
make_ntp_conf
|
||||
}
|
||||
diff -ur a/client/scripts/solaris b/client/scripts/solaris
|
||||
--- a/client/scripts/solaris 2008-09-01 14:41:00.000000000 +0100
|
||||
+++ b/client/scripts/solaris 2008-09-01 14:59:27.000000000 +0100
|
||||
@@ -1,22 +1,41 @@
|
||||
#!/bin/sh
|
||||
|
||||
make_resolv_conf() {
|
||||
+ if [ x"$PEER_DNS" != x ] && [ x$"PEER_DNS" != xyes ]; then
|
||||
+ return 0
|
||||
+ fi
|
||||
+ local conf=
|
||||
if [ x"$new_domain_name_servers" != x ]; then
|
||||
- cat /dev/null > /etc/resolv.conf.dhclient
|
||||
- if [ x"$new_domain_search" != x ]; then
|
||||
- echo search $new_domain_search >> /etc/resolv.conf.dhclient
|
||||
- elif [ x"$new_domain_name" != x ]; then
|
||||
+ if [ "x$new_domain_search" != x ]; then
|
||||
+ conf="${conf}search ${new_domain_search}\n"
|
||||
+ elif [ "x$new_domain_name" != x ]; then
|
||||
# Note that the DHCP 'Domain Name Option' is really just a domain
|
||||
# name, and that this practice of using the domain name option as
|
||||
# a search path is both nonstandard and deprecated.
|
||||
- echo search $new_domain_name >> /etc/resolv.conf.dhclient
|
||||
+ conf="${conf}search ${new_domain_name}\n"
|
||||
fi
|
||||
for nameserver in $new_domain_name_servers; do
|
||||
- echo nameserver $nameserver >>/etc/resolv.conf.dhclient
|
||||
+ conf="${conf}nameserver ${nameserver}\n"
|
||||
+ done
|
||||
+ elif [ "x${new_dhcp6_name_servers}" != x ] ; then
|
||||
+ if [ "x${new_dhcp6_domain_search}" != x ] ; then
|
||||
+ conf="${conf}search ${new_dhcp6_domain_search}\n"
|
||||
+ fi
|
||||
+ for nameserver in ${new_dhcp6_name_servers} ; do
|
||||
+ conf="${conf}nameserver ${nameserver}\n"
|
||||
done
|
||||
+ fi
|
||||
|
||||
- mv /etc/resolv.conf.dhclient /etc/resolv.conf
|
||||
+ if [ x"$conf" != x ]; then
|
||||
+ conf="# Generated by dhclient or interface $interface\n${conf}"
|
||||
+ if type resolvconf >/dev/null 2>&1; then
|
||||
+ printf "${conf}" | resolvconf -a $interface
|
||||
+ else
|
||||
+ printf "${conf}" > /etc/resolv.conf
|
||||
+ chmod 644 /etc/resolv.conf
|
||||
+ fi
|
||||
fi
|
||||
+
|
||||
# If we're making confs, may as well make an ntp.conf too
|
||||
make_ntp_conf
|
||||
}
|
@ -1,48 +0,0 @@
|
||||
diff -uNr dhcp-4.0.0.ORIG/client/scripts/linux dhcp-4.0.0/client/scripts/linux
|
||||
--- dhcp-4.0.0.ORIG/client/scripts/linux 2008-09-03 00:52:41.000000000 +0100
|
||||
+++ dhcp-4.0.0/client/scripts/linux 2008-09-03 00:53:16.000000000 +0100
|
||||
@@ -258,7 +232,7 @@
|
||||
### DHCPv6 Handlers
|
||||
###
|
||||
|
||||
-if [ ${reason} = PREINIT6 ] ; then
|
||||
+if [ x$reason = xPREINIT6 ] ; then
|
||||
# Ensure interface is up.
|
||||
${ip} link set ${interface} up
|
||||
|
||||
@@ -268,7 +242,7 @@
|
||||
exit_with_hooks 0
|
||||
fi
|
||||
|
||||
-if [ ${reason} = BOUND6 ] ; then
|
||||
+if [ x$reason = xBOUND6 ] ; then
|
||||
if [ x${new_ip6_address} = x ] || [ x${new_ip6_prefixlen} = x ] ; then
|
||||
exit_with_hooks 2;
|
||||
fi
|
||||
@@ -282,7 +256,7 @@
|
||||
exit_with_hooks 0
|
||||
fi
|
||||
|
||||
-if [ ${reason} = RENEW6 ] || [ ${reason} = REBIND6 ] ; then
|
||||
+if [ x$reason = xRENEW6 ] || [ x$reason} = xREBIND6 ] ; then
|
||||
# Make sure nothing has moved around on us.
|
||||
|
||||
# Nameservers/domains/etc.
|
||||
@@ -294,7 +268,7 @@
|
||||
exit_with_hooks 0
|
||||
fi
|
||||
|
||||
-if [ ${reason} = DEPREF6 ] ; then
|
||||
+if [ x$reason = xDEPREF6 ] ; then
|
||||
if [ x${new_ip6_prefixlen} = x ] ; then
|
||||
exit_with_hooks 2;
|
||||
fi
|
||||
@@ -307,7 +281,7 @@
|
||||
exit_with_hooks 0
|
||||
fi
|
||||
|
||||
-if [ ${reason} = EXPIRE6 -o ${reason} = RELEASE6 -o ${reason} = STOP6 ] ; then
|
||||
+if [ x$reason = xEXPIRE6 -o x$reason = xRELEASE6 -o x$reason = xSTOP6 ] ; then
|
||||
if [ x${old_ip6_address} = x ] || [ x${old_ip6_prefixlen} = x ] ; then
|
||||
exit_with_hooks 2;
|
||||
fi
|
@ -1,115 +0,0 @@
|
||||
diff -ur a/client/clparse.c b/client/clparse.c
|
||||
--- a/client/clparse.c 2008-09-03 21:39:30.000000000 +0100
|
||||
+++ b/client/clparse.c 2008-09-03 23:10:48.000000000 +0100
|
||||
@@ -172,6 +172,10 @@
|
||||
#endif
|
||||
}
|
||||
|
||||
+ /* Read any extra configuration from stdin */
|
||||
+ read_client_conf_stdin ((struct interface_info *)0,
|
||||
+ &top_level_config);
|
||||
+
|
||||
/* Set up state and config structures for clients that don't
|
||||
have per-interface configuration statements. */
|
||||
config = (struct client_config *)0;
|
||||
@@ -201,21 +205,13 @@
|
||||
return status;
|
||||
}
|
||||
|
||||
-int read_client_conf_file (const char *name, struct interface_info *ip,
|
||||
- struct client_config *client)
|
||||
+int read_client_conf_actual (struct parse *cfile, struct interface_info *ip,
|
||||
+ struct client_config *client)
|
||||
{
|
||||
- int file;
|
||||
- struct parse *cfile;
|
||||
const char *val;
|
||||
int token;
|
||||
isc_result_t status;
|
||||
|
||||
- if ((file = open (name, O_RDONLY)) < 0)
|
||||
- return uerr2isc (errno);
|
||||
-
|
||||
- cfile = (struct parse *)0;
|
||||
- new_parse (&cfile, file, (char *)0, 0, path_dhclient_conf, 0);
|
||||
-
|
||||
do {
|
||||
token = peek_token (&val, (unsigned *)0, cfile);
|
||||
if (token == END_OF_FILE)
|
||||
@@ -226,10 +222,74 @@
|
||||
status = (cfile -> warnings_occurred
|
||||
? ISC_R_BADPARSE
|
||||
: ISC_R_SUCCESS);
|
||||
+ return status;
|
||||
+}
|
||||
+
|
||||
+int read_client_conf_file (const char *name, struct interface_info *ip,
|
||||
+ struct client_config *client)
|
||||
+{
|
||||
+ int file;
|
||||
+ struct parse *cfile;
|
||||
+ isc_result_t status;
|
||||
+
|
||||
+ if ((file = open (name, O_RDONLY)) < 0)
|
||||
+ return uerr2isc (errno);
|
||||
+
|
||||
+ cfile = (struct parse *)0;
|
||||
+ new_parse (&cfile, file, (char *)0, 0, path_dhclient_conf, 0);
|
||||
+ status = read_client_conf_actual(cfile, ip, client);
|
||||
end_parse (&cfile);
|
||||
return status;
|
||||
}
|
||||
|
||||
+int read_client_conf_stdin (struct interface_info *ip,
|
||||
+ struct client_config *client)
|
||||
+{
|
||||
+ int file;
|
||||
+ char *buffer = NULL, *p;
|
||||
+ unsigned buflen, len = 0;
|
||||
+ struct parse *cfile;
|
||||
+ size_t bytes;
|
||||
+ isc_result_t status;
|
||||
+
|
||||
+ file = fileno(stdin);
|
||||
+ if (isatty (file))
|
||||
+ return ISC_R_NOTFOUND;
|
||||
+ if (fcntl (file, F_SETFL, O_NONBLOCK) < 0)
|
||||
+ log_fatal ("could not set stdin to non blocking!");
|
||||
+
|
||||
+ buflen = BUFSIZ;
|
||||
+ buffer = malloc (BUFSIZ + 1);
|
||||
+ p = buffer;
|
||||
+ do {
|
||||
+ bytes = read (file, p, BUFSIZ);
|
||||
+ if (bytes == 0)
|
||||
+ break;
|
||||
+ if (bytes == -1)
|
||||
+ log_fatal ("failed to read stdin!");
|
||||
+ if (bytes >= BUFSIZ) {
|
||||
+ buflen += BUFSIZ;
|
||||
+ len += BUFSIZ;
|
||||
+ buffer = realloc (buffer, buflen + 1);
|
||||
+ if (!buffer)
|
||||
+ log_fatal ("not enough buffer to read stdin!");
|
||||
+ p = buffer + len;
|
||||
+ } else {
|
||||
+ len += bytes;
|
||||
+ break;
|
||||
+ }
|
||||
+ } while(1);
|
||||
+ buffer[len] = '\0';
|
||||
+
|
||||
+ cfile = (struct parse *)0;
|
||||
+ status = new_parse (&cfile, -1, buffer, len, "stdin", 0);
|
||||
+ if (status == ISC_R_SUCCESS) {
|
||||
+ status = read_client_conf_actual (cfile, ip, client);
|
||||
+ end_parse (&cfile);
|
||||
+ }
|
||||
+ free(buffer);
|
||||
+ return status;
|
||||
+}
|
||||
|
||||
/* lease-file :== client-lease-statements END_OF_FILE
|
||||
client-lease-statements :== <nil>
|
||||
Files a/client/clparse.o and b/client/clparse.o differ
|
||||
Files a/client/dhclient and b/client/dhclient differ
|
@ -1,25 +0,0 @@
|
||||
diff -uNr dhcp-4.0.0.ORIG/common/socket.c dhcp-4.0.0/common/socket.c
|
||||
--- dhcp-4.0.0.ORIG/common/socket.c 2008-09-02 10:25:21.000000000 +0100
|
||||
+++ dhcp-4.0.0/common/socket.c 2008-09-02 10:27:29.000000000 +0100
|
||||
@@ -46,6 +46,10 @@
|
||||
#include <sys/uio.h>
|
||||
#include <sys/uio.h>
|
||||
|
||||
+#ifdef HAVE_LINUX_IPV6_H
|
||||
+#include <linux/ipv6.h>
|
||||
+#endif
|
||||
+
|
||||
#ifdef USE_SOCKET_FALLBACK
|
||||
# if !defined (USE_SOCKET_SEND)
|
||||
# define if_register_send if_register_fallback
|
||||
diff -uNr dhcp-4.0.0.ORIG/configure.ac dhcp-4.0.0/configure.ac
|
||||
--- dhcp-4.0.0.ORIG/configure.ac 2008-09-02 10:25:21.000000000 +0100
|
||||
+++ dhcp-4.0.0/configure.ac 2008-09-02 10:26:29.000000000 +0100
|
||||
@@ -37,6 +37,7 @@
|
||||
if test "$enable_dhcpv6" != "no"; then
|
||||
AC_DEFINE([DHCPv6], [1],
|
||||
[Define to 1 to include DHCPv6 support.])
|
||||
+ AC_CHECK_HEADERS(linux/ipv6.h)
|
||||
fi
|
||||
|
||||
###
|
@ -1,96 +0,0 @@
|
||||
diff -uNr dhcp-4.0.0.ORIG/client/dhclient.c dhcp-4.0.0/client/dhclient.c
|
||||
--- dhcp-4.0.0.ORIG/client/dhclient.c 2008-09-01 13:38:38.000000000 +0100
|
||||
+++ dhcp-4.0.0/client/dhclient.c 2008-09-01 13:41:32.000000000 +0100
|
||||
@@ -80,6 +80,8 @@
|
||||
|
||||
static isc_result_t write_duid(struct data_string *duid);
|
||||
|
||||
+extern int log_isc_blurb;
|
||||
+
|
||||
int
|
||||
main(int argc, char **argv) {
|
||||
int fd;
|
||||
@@ -323,6 +325,7 @@
|
||||
log_info ("%s", "");
|
||||
} else {
|
||||
log_perror = 0;
|
||||
+ log_isc_blurb = 0;
|
||||
quiet_interface_discovery = 1;
|
||||
}
|
||||
|
||||
diff -uNr dhcp-4.0.0.ORIG/omapip/errwarn.c dhcp-4.0.0/omapip/errwarn.c
|
||||
--- dhcp-4.0.0.ORIG/omapip/errwarn.c 2008-09-01 13:38:38.000000000 +0100
|
||||
+++ dhcp-4.0.0/omapip/errwarn.c 2008-09-01 13:39:17.000000000 +0100
|
||||
@@ -43,6 +43,8 @@
|
||||
int log_perror = 1;
|
||||
#endif
|
||||
int log_priority;
|
||||
+int log_isc_blurb=1;
|
||||
+
|
||||
void (*log_cleanup) (void);
|
||||
|
||||
#define CVT_BUF_MAX 1023
|
||||
@@ -74,7 +76,9 @@
|
||||
write (STDERR_FILENO, "\n", 1);
|
||||
}
|
||||
|
||||
-#if !defined (NOMINUM)
|
||||
+#if !defined(NOMINUM)
|
||||
+ if ( log_isc_blurb )
|
||||
+ {
|
||||
log_error ("%s", "");
|
||||
log_error ("If you did not get this software from ftp.isc.org, please");
|
||||
log_error ("get the latest from ftp.isc.org and install that before");
|
||||
@@ -92,7 +96,12 @@
|
||||
log_error ("the README file.");
|
||||
log_error ("%s", "");
|
||||
log_error ("exiting.");
|
||||
+ }else
|
||||
+ {
|
||||
+ log_error ("exiting.");
|
||||
+ }
|
||||
#endif
|
||||
+
|
||||
if (log_cleanup)
|
||||
(*log_cleanup) ();
|
||||
exit (1);
|
||||
diff -uNr dhcp-4.0.0.ORIG/relay/dhcrelay.c dhcp-4.0.0/relay/dhcrelay.c
|
||||
--- dhcp-4.0.0.ORIG/relay/dhcrelay.c 2008-09-01 13:38:38.000000000 +0100
|
||||
+++ dhcp-4.0.0/relay/dhcrelay.c 2008-09-01 13:43:15.000000000 +0100
|
||||
@@ -97,6 +97,7 @@
|
||||
static char arr [] = "All rights reserved.";
|
||||
static char message [] = "Internet Systems Consortium DHCP Relay Agent";
|
||||
static char url [] = "For info, please visit http://www.isc.org/sw/dhcp/";
|
||||
+extern int log_isc_blurb;
|
||||
|
||||
int
|
||||
main(int argc, char **argv) {
|
||||
@@ -163,6 +164,7 @@
|
||||
} else if (!strcmp (argv [i], "-q")) {
|
||||
quiet = 1;
|
||||
quiet_interface_discovery = 1;
|
||||
+ log_isc_blurb = 0;
|
||||
} else if (!strcmp (argv [i], "-a")) {
|
||||
add_agent_options = 1;
|
||||
} else if (!strcmp (argv [i], "-c")) {
|
||||
diff -uNr dhcp-4.0.0.ORIG/server/dhcpd.c dhcp-4.0.0/server/dhcpd.c
|
||||
--- dhcp-4.0.0.ORIG/server/dhcpd.c 2008-09-01 13:38:38.000000000 +0100
|
||||
+++ dhcp-4.0.0/server/dhcpd.c 2008-09-01 13:42:37.000000000 +0100
|
||||
@@ -61,6 +61,9 @@
|
||||
struct iaddr server_identifier;
|
||||
int server_identifier_matched;
|
||||
|
||||
+
|
||||
+extern int log_isc_blurb;
|
||||
+
|
||||
#if defined (NSUPDATE)
|
||||
|
||||
/* This stuff is always executed to figure the default values for certain
|
||||
@@ -359,6 +362,7 @@
|
||||
lftest = 1;
|
||||
log_perror = -1;
|
||||
} else if (!strcmp (argv [i], "-q")) {
|
||||
+ log_isc_blurb = 0;
|
||||
quiet = 1;
|
||||
quiet_interface_discovery = 1;
|
||||
#ifdef DHCPv6
|
@ -1,189 +0,0 @@
|
||||
diff -uNr dhcp-4.0.0.ORIG/configure.ac dhcp-4.0.0/configure.ac
|
||||
--- dhcp-4.0.0.ORIG/configure.ac 2008-09-02 10:57:37.000000000 +0100
|
||||
+++ dhcp-4.0.0/configure.ac 2008-09-02 11:00:27.000000000 +0100
|
||||
@@ -30,6 +30,17 @@
|
||||
[Define to BIG_ENDIAN for MSB (Motorola or SPARC CPUs)
|
||||
or LITTLE_ENDIAN for LSB (Intel CPUs).])
|
||||
|
||||
+# Paranoia/early chrooting is off by default
|
||||
+AC_ARG_ENABLE(paranoia,
|
||||
+ AC_HELP_STRING([--enable-paranoia],
|
||||
+ [enable support for early chroot (default is no)]))
|
||||
+if test "$enable_paranoia" != "no"; then
|
||||
+ AC_DEFINE([PARANOIA], [1],
|
||||
+ [Define to enable paranoia.])
|
||||
+ AC_DEFINE([EARLY_CHROOT], [1],
|
||||
+ [Define to 1 to chroot early.])
|
||||
+fi
|
||||
+
|
||||
# DHCPv6 is off by default
|
||||
AC_ARG_ENABLE(dhcpv6,
|
||||
AC_HELP_STRING([--enable-dhcpv6],
|
||||
diff -uNr dhcp-4.0.0.ORIG/server/dhcpd.c dhcp-4.0.0/server/dhcpd.c
|
||||
--- dhcp-4.0.0.ORIG/server/dhcpd.c 2008-09-02 10:57:37.000000000 +0100
|
||||
+++ dhcp-4.0.0/server/dhcpd.c 2008-09-02 10:57:54.000000000 +0100
|
||||
@@ -46,6 +46,16 @@
|
||||
#include <sys/types.h>
|
||||
#include <signal.h>
|
||||
|
||||
+#if defined (PARANOIA)
|
||||
+# include <sys/types.h>
|
||||
+# include <unistd.h>
|
||||
+# include <pwd.h>
|
||||
+/* get around the ISC declaration of group */
|
||||
+# define group real_group
|
||||
+# include <grp.h>
|
||||
+# undef group
|
||||
+#endif /* PARANOIA */
|
||||
+
|
||||
static void usage(void);
|
||||
|
||||
struct iaddr server_identifier;
|
||||
@@ -195,6 +205,21 @@
|
||||
omapi_object_dereference (&listener, MDL);
|
||||
}
|
||||
|
||||
+#if defined (PARANOIA)
|
||||
+/* to be used in one of two possible scenarios */
|
||||
+static void setup_chroot (char *chroot_dir) {
|
||||
+ if (geteuid())
|
||||
+ log_fatal ("you must be root to use chroot");
|
||||
+ if (chroot(chroot_dir)) {
|
||||
+ log_fatal ("chroot(\"%s\"): %m", chroot_dir);
|
||||
+ }
|
||||
+ if (chdir ("/")) {
|
||||
+ /* probably permission denied */
|
||||
+ log_fatal ("chdir(\"/\"): %m");
|
||||
+ }
|
||||
+}
|
||||
+#endif /* PARANOIA */
|
||||
+
|
||||
#ifndef UNIT_TEST
|
||||
int
|
||||
main(int argc, char **argv) {
|
||||
@@ -224,6 +249,14 @@
|
||||
char *traceinfile = (char *)0;
|
||||
char *traceoutfile = (char *)0;
|
||||
#endif
|
||||
+#if defined (PARANOIA)
|
||||
+ char *set_user = 0;
|
||||
+ char *set_group = 0;
|
||||
+ char *set_chroot = 0;
|
||||
+
|
||||
+ uid_t set_uid = 0;
|
||||
+ gid_t set_gid = 0;
|
||||
+#endif /* PARANOIA */
|
||||
|
||||
/* Make sure that file descriptors 0 (stdin), 1, (stdout), and
|
||||
2 (stderr) are open. To do this, we assume that when we
|
||||
@@ -284,6 +317,20 @@
|
||||
if (++i == argc)
|
||||
usage ();
|
||||
server = argv [i];
|
||||
+#if defined (PARANOIA)
|
||||
+ } else if (!strcmp (argv [i], "-user")) {
|
||||
+ if (++i == argc)
|
||||
+ usage ();
|
||||
+ set_user = argv [i];
|
||||
+ } else if (!strcmp (argv [i], "-group")) {
|
||||
+ if (++i == argc)
|
||||
+ usage ();
|
||||
+ set_group = argv [i];
|
||||
+ } else if (!strcmp (argv [i], "-chroot")) {
|
||||
+ if (++i == argc)
|
||||
+ usage ();
|
||||
+ set_chroot = argv [i];
|
||||
+#endif /* PARANOIA */
|
||||
} else if (!strcmp (argv [i], "-cf")) {
|
||||
if (++i == argc)
|
||||
usage ();
|
||||
@@ -438,6 +485,44 @@
|
||||
trace_seed_stop, MDL);
|
||||
#endif
|
||||
|
||||
+#if defined (PARANOIA)
|
||||
+ /* get user and group info if those options were given */
|
||||
+ if (set_user) {
|
||||
+ struct passwd *tmp_pwd;
|
||||
+
|
||||
+ if (geteuid())
|
||||
+ log_fatal ("you must be root to set user");
|
||||
+
|
||||
+ if (!(tmp_pwd = getpwnam(set_user)))
|
||||
+ log_fatal ("no such user: %s", set_user);
|
||||
+
|
||||
+ set_uid = tmp_pwd->pw_uid;
|
||||
+
|
||||
+ /* use the user's group as the default gid */
|
||||
+ if (!set_group)
|
||||
+ set_gid = tmp_pwd->pw_gid;
|
||||
+ }
|
||||
+
|
||||
+ if (set_group) {
|
||||
+/* get around the ISC declaration of group */
|
||||
+#define group real_group
|
||||
+ struct group *tmp_grp;
|
||||
+
|
||||
+ if (geteuid())
|
||||
+ log_fatal ("you must be root to set group");
|
||||
+
|
||||
+ if (!(tmp_grp = getgrnam(set_group)))
|
||||
+ log_fatal ("no such group: %s", set_group);
|
||||
+
|
||||
+ set_gid = tmp_grp->gr_gid;
|
||||
+#undef group
|
||||
+ }
|
||||
+
|
||||
+# if defined (EARLY_CHROOT)
|
||||
+ if (set_chroot) setup_chroot (set_chroot);
|
||||
+# endif /* EARLY_CHROOT */
|
||||
+#endif /* PARANOIA */
|
||||
+
|
||||
/* Default to the DHCP/BOOTP port. */
|
||||
if (!local_port)
|
||||
{
|
||||
@@ -576,6 +661,10 @@
|
||||
|
||||
postconf_initialization (quiet);
|
||||
|
||||
+#if defined (PARANOIA) && !defined (EARLY_CHROOT)
|
||||
+ if (set_chroot) setup_chroot (set_chroot);
|
||||
+#endif /* PARANOIA && !EARLY_CHROOT */
|
||||
+
|
||||
/* test option should cause an early exit */
|
||||
if (cftest && !lftest)
|
||||
exit(0);
|
||||
@@ -659,6 +748,22 @@
|
||||
exit (0);
|
||||
}
|
||||
|
||||
+#if defined (PARANOIA)
|
||||
+ /* change uid to the specified one */
|
||||
+
|
||||
+ if (set_gid) {
|
||||
+ if (setgroups (0, (void *)0))
|
||||
+ log_fatal ("setgroups: %m");
|
||||
+ if (setgid (set_gid))
|
||||
+ log_fatal ("setgid(%d): %m", (int) set_gid);
|
||||
+ }
|
||||
+
|
||||
+ if (set_uid) {
|
||||
+ if (setuid (set_uid))
|
||||
+ log_fatal ("setuid(%d): %m", (int) set_uid);
|
||||
+ }
|
||||
+#endif /* PARANOIA */
|
||||
+
|
||||
/* Read previous pid file. */
|
||||
if ((i = open (path_dhcpd_pid, O_RDONLY)) >= 0) {
|
||||
status = read(i, pbuf, (sizeof pbuf) - 1);
|
||||
@@ -1039,6 +1144,10 @@
|
||||
#else /* !DHCPv6 */
|
||||
" [-cf config-file] [-lf lease-file]\n"
|
||||
#endif /* DHCPv6 */
|
||||
+#if defined (PARANOIA)
|
||||
+ /* meld into the following string */
|
||||
+ "\n [-user user] [-group group] [-chroot dir]"
|
||||
+#endif /* PARANOIA */
|
||||
#if defined (TRACING)
|
||||
" [-tf trace-output-file]\n"
|
||||
" [-play trace-input-file]\n"
|
@ -1,114 +0,0 @@
|
||||
diff -uNr dhcp-4.0.1.ORIG/client/clparse.c dhcp-4.0.1/client/clparse.c
|
||||
--- dhcp-4.0.1.ORIG/client/clparse.c 2009-03-30 13:54:47.000000000 +0100
|
||||
+++ dhcp-4.0.1/client/clparse.c 2009-03-30 13:58:02.000000000 +0100
|
||||
@@ -174,6 +174,10 @@
|
||||
#endif
|
||||
}
|
||||
|
||||
+ /* Read any extra configuration from stdin */
|
||||
+ read_client_conf_stdin ((struct interface_info *)0,
|
||||
+ &top_level_config);
|
||||
+
|
||||
/* Set up state and config structures for clients that don't
|
||||
have per-interface configuration statements. */
|
||||
config = (struct client_config *)0;
|
||||
@@ -203,23 +207,13 @@
|
||||
return status;
|
||||
}
|
||||
|
||||
-int read_client_conf_file (const char *name, struct interface_info *ip,
|
||||
+int read_client_conf_actual (struct parse *cfile, struct interface_info *ip,
|
||||
struct client_config *client)
|
||||
{
|
||||
- int file;
|
||||
- struct parse *cfile;
|
||||
const char *val;
|
||||
int token;
|
||||
isc_result_t status;
|
||||
|
||||
- if ((file = open (name, O_RDONLY)) < 0)
|
||||
- return uerr2isc (errno);
|
||||
-
|
||||
- cfile = NULL;
|
||||
- status = new_parse(&cfile, file, NULL, 0, path_dhclient_conf, 0);
|
||||
- if (status != ISC_R_SUCCESS || cfile == NULL)
|
||||
- return status;
|
||||
-
|
||||
do {
|
||||
token = peek_token (&val, (unsigned *)0, cfile);
|
||||
if (token == END_OF_FILE)
|
||||
@@ -230,10 +224,74 @@
|
||||
status = (cfile -> warnings_occurred
|
||||
? ISC_R_BADPARSE
|
||||
: ISC_R_SUCCESS);
|
||||
+ return status;
|
||||
+}
|
||||
+
|
||||
+int read_client_conf_file (const char *name, struct interface_info *ip,
|
||||
+ struct client_config *client)
|
||||
+{
|
||||
+ int file;
|
||||
+ struct parse *cfile;
|
||||
+ isc_result_t status;
|
||||
+
|
||||
+ if ((file = open (name, O_RDONLY)) < 0)
|
||||
+ return uerr2isc (errno);
|
||||
+
|
||||
+ cfile = (struct parse *)0;
|
||||
+ new_parse (&cfile, file, (char *)0, 0, path_dhclient_conf, 0);
|
||||
+ status = read_client_conf_actual(cfile, ip, client);
|
||||
end_parse (&cfile);
|
||||
return status;
|
||||
}
|
||||
|
||||
+int read_client_conf_stdin (struct interface_info *ip,
|
||||
+ struct client_config *client)
|
||||
+{
|
||||
+ int file;
|
||||
+ char *buffer = NULL, *p;
|
||||
+ unsigned buflen, len = 0;
|
||||
+ struct parse *cfile;
|
||||
+ size_t bytes;
|
||||
+ isc_result_t status;
|
||||
+
|
||||
+ file = fileno(stdin);
|
||||
+ if (isatty (file))
|
||||
+ return ISC_R_NOTFOUND;
|
||||
+ if (fcntl (file, F_SETFL, O_NONBLOCK) < 0)
|
||||
+ log_fatal ("could not set stdin to non blocking!");
|
||||
+
|
||||
+ buflen = BUFSIZ;
|
||||
+ buffer = malloc (BUFSIZ + 1);
|
||||
+ p = buffer;
|
||||
+ do {
|
||||
+ bytes = read (file, p, BUFSIZ);
|
||||
+ if (bytes == 0)
|
||||
+ break;
|
||||
+ if (bytes == -1)
|
||||
+ log_fatal ("failed to read stdin!");
|
||||
+ if (bytes >= BUFSIZ) {
|
||||
+ buflen += BUFSIZ;
|
||||
+ len += BUFSIZ;
|
||||
+ buffer = realloc (buffer, buflen + 1);
|
||||
+ if (!buffer)
|
||||
+ log_fatal ("not enough buffer to read stdin!");
|
||||
+ p = buffer + len;
|
||||
+ } else {
|
||||
+ len += bytes;
|
||||
+ break;
|
||||
+ }
|
||||
+ } while(1);
|
||||
+ buffer[len] = '\0';
|
||||
+
|
||||
+ cfile = (struct parse *)0;
|
||||
+ status = new_parse (&cfile, -1, buffer, len, "stdin", 0);
|
||||
+ if (status == ISC_R_SUCCESS) {
|
||||
+ status = read_client_conf_actual (cfile, ip, client);
|
||||
+ end_parse (&cfile);
|
||||
+ }
|
||||
+ free(buffer);
|
||||
+ return status;
|
||||
+}
|
||||
|
||||
/* lease-file :== client-lease-statements END_OF_FILE
|
||||
client-lease-statements :== <nil>
|
@ -1,83 +0,0 @@
|
||||
--- /usr/portage/net-misc/dhcp/dhcp-4.0.1.ebuild 2009-03-30 15:13:28.000000000 +0200
|
||||
+++ dhcp-4.2.0.ebuild 2009-07-08 19:11:15.121631116 +0200
|
||||
@@ -4,22 +4,30 @@
|
||||
|
||||
inherit eutils flag-o-matic autotools
|
||||
|
||||
+LDAP_PV="4.0.1-2.1"
|
||||
+
|
||||
MY_PV="${PV//_alpha/a}"
|
||||
MY_PV="${MY_PV//_beta/b}"
|
||||
MY_PV="${MY_PV//_rc/rc}"
|
||||
MY_P="${PN}-${MY_PV}"
|
||||
+MY_LDAP_PV="${LDAP_PV//-*/}"
|
||||
+
|
||||
DESCRIPTION="ISC Dynamic Host Configuration Protocol"
|
||||
HOMEPAGE="http://www.isc.org/products/DHCP"
|
||||
-SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz"
|
||||
+SRC_URI="ftp://ftp.isc.org/isc/dhcp/${MY_P}.tar.gz
|
||||
+ ldap? ( http://dcantrel.fedorapeople.org/dhcp/ldap-patch/ldap-for-dhcp-${LDAP_PV}.tar.gz
|
||||
+ http://ftp.disconnected-by-peer.at/pub/ldap-for-dhcp-${LDAP_PV}.tar.gz )"
|
||||
|
||||
LICENSE="isc-dhcp"
|
||||
SLOT="0"
|
||||
KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~s390 ~sh ~sparc ~sparc-fbsd ~x86 ~x86-fbsd"
|
||||
-IUSE="doc ipv6 selinux kernel_linux vim-syntax"
|
||||
+IUSE="doc ipv6 selinux kernel_linux vim-syntax ldap ssl"
|
||||
|
||||
DEPEND="selinux? ( sec-policy/selinux-dhcp )
|
||||
kernel_linux? ( sys-apps/net-tools )
|
||||
- vim-syntax? ( app-vim/dhcpd-syntax )"
|
||||
+ vim-syntax? ( app-vim/dhcpd-syntax )
|
||||
+ ldap? ( net-nds/openldap
|
||||
+ ssl? ( dev-libs/openssl ) )"
|
||||
|
||||
PROVIDE="virtual/dhcpc"
|
||||
|
||||
@@ -65,6 +73,9 @@
|
||||
# Add dbus support to dhclient
|
||||
epatch "${FILESDIR}/${PN}"-3.0.3-dhclient-dbus.patch
|
||||
|
||||
+ # Ldap patch for dhcp
|
||||
+ epatch "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}/dhcp-${MY_LDAP_PV}"-ldap.patch
|
||||
+
|
||||
# Brand the version with Gentoo
|
||||
# include revision if >0
|
||||
local newver="Gentoo"
|
||||
@@ -114,6 +125,8 @@
|
||||
--with-srv-lease-file=/var/lib/dhcp/dhcpd.leases \
|
||||
--with-relay-pid-file=/var/run/dhcp/dhcrelay.pid \
|
||||
$(use_enable ipv6 dhcpv6) \
|
||||
+ $(use_with ldap) \
|
||||
+ $(use_with ssl ldapcrypto) \
|
||||
|| die
|
||||
|
||||
emake || die "compile problem"
|
||||
@@ -138,8 +151,10 @@
|
||||
newexe "${S}"/client/scripts/freebsd dhclient-script
|
||||
fi
|
||||
|
||||
- use doc && dodoc README RELNOTES doc/*
|
||||
-
|
||||
+ if use doc; then
|
||||
+ dodoc README RELNOTES doc/*
|
||||
+ use ldap && dodoc "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/*.ldap "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/draft-ietf-dhc-ldap-schema-01.txt
|
||||
+ fi
|
||||
insinto /etc/dhcp
|
||||
newins client/dhclient.conf dhclient.conf.sample
|
||||
keepdir /var/{lib,run}/dhcp
|
||||
@@ -152,6 +167,14 @@
|
||||
newconfd "${FILESDIR}"/dhcpd.conf dhcpd
|
||||
newconfd "${FILESDIR}"/dhcrelay.conf dhcrelay
|
||||
|
||||
+ # install ldap files
|
||||
+ if use ldap; then
|
||||
+ insinto /etc/openldap/schema
|
||||
+ doins "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/dhcp.*
|
||||
+ dosbin "${WORKDIR}/ldap-for-dhcp-${LDAP_PV}"/dhcpd-conf-to-ldap
|
||||
+ fi
|
||||
+
|
||||
+
|
||||
# We never want portage to own this file
|
||||
rm -f "${D}"/var/lib/dhcp/dhcpd.leases
|
||||
}
|
@ -1,105 +0,0 @@
|
||||
Submitted By: Mario Fetka (geos_one) (mario dot fetka at gmail dot com)
|
||||
Date: 2010-02-14
|
||||
Initial Package Version: 4.0.0
|
||||
Origin: gentoo patch dhcp-4.0-no_isc_blurb.patch
|
||||
Upstream Status:
|
||||
Description:
|
||||
|
||||
diff -Naur dhcp-4.0.2.orig/client/dhclient.c dhcp-4.0.2/client/dhclient.c
|
||||
--- dhcp-4.0.2.orig/client/dhclient.c 2010-02-14 07:26:37.018800468 +0000
|
||||
+++ dhcp-4.0.2/client/dhclient.c 2010-02-14 07:26:44.163801138 +0000
|
||||
@@ -80,6 +80,8 @@
|
||||
|
||||
static isc_result_t write_duid(struct data_string *duid);
|
||||
|
||||
+extern int log_isc_blurb;
|
||||
+
|
||||
int
|
||||
main(int argc, char **argv) {
|
||||
int fd;
|
||||
@@ -325,6 +327,7 @@
|
||||
log_info ("%s", "");
|
||||
} else {
|
||||
log_perror = 0;
|
||||
+ log_isc_blurb = 0;
|
||||
quiet_interface_discovery = 1;
|
||||
}
|
||||
|
||||
diff -Naur dhcp-4.0.2.orig/omapip/errwarn.c dhcp-4.0.2/omapip/errwarn.c
|
||||
--- dhcp-4.0.2.orig/omapip/errwarn.c 2010-02-14 07:26:37.006801498 +0000
|
||||
+++ dhcp-4.0.2/omapip/errwarn.c 2010-02-14 07:26:44.164800970 +0000
|
||||
@@ -43,6 +43,8 @@
|
||||
int log_perror = 1;
|
||||
#endif
|
||||
int log_priority;
|
||||
+int log_isc_blurb=1;
|
||||
+
|
||||
void (*log_cleanup) (void);
|
||||
|
||||
#define CVT_BUF_MAX 1023
|
||||
@@ -74,7 +76,9 @@
|
||||
IGNORE_RET (write (STDERR_FILENO, "\n", 1));
|
||||
}
|
||||
|
||||
-#if !defined (NOMINUM)
|
||||
+#if !defined(NOMINUM)
|
||||
+ if ( log_isc_blurb )
|
||||
+ {
|
||||
log_error ("%s", "");
|
||||
log_error ("If you did not get this software from ftp.isc.org, please");
|
||||
log_error ("get the latest from ftp.isc.org and install that before");
|
||||
@@ -92,7 +96,12 @@
|
||||
log_error ("the README file.");
|
||||
log_error ("%s", "");
|
||||
log_error ("exiting.");
|
||||
+ }else
|
||||
+ {
|
||||
+ log_error ("exiting.");
|
||||
+ }
|
||||
#endif
|
||||
+
|
||||
if (log_cleanup)
|
||||
(*log_cleanup) ();
|
||||
exit (1);
|
||||
diff -Naur dhcp-4.0.2.orig/relay/dhcrelay.c dhcp-4.0.2/relay/dhcrelay.c
|
||||
--- dhcp-4.0.2.orig/relay/dhcrelay.c 2010-02-14 07:26:37.014800648 +0000
|
||||
+++ dhcp-4.0.2/relay/dhcrelay.c 2010-02-14 07:28:00.771800735 +0000
|
||||
@@ -103,7 +103,8 @@
|
||||
"Internet Systems Consortium DHCP Relay Agent";
|
||||
static const char url[] =
|
||||
"For info, please visit https://www.isc.org/software/dhcp/";
|
||||
-
|
||||
+extern int log_isc_blurb;
|
||||
+
|
||||
int
|
||||
main(int argc, char **argv) {
|
||||
int fd;
|
||||
@@ -169,6 +170,7 @@
|
||||
} else if (!strcmp (argv [i], "-q")) {
|
||||
quiet = 1;
|
||||
quiet_interface_discovery = 1;
|
||||
+ log_isc_blurb = 0;
|
||||
} else if (!strcmp (argv [i], "-a")) {
|
||||
add_agent_options = 1;
|
||||
} else if (!strcmp (argv [i], "-c")) {
|
||||
diff -Naur dhcp-4.0.2.orig/server/dhcpd.c dhcp-4.0.2/server/dhcpd.c
|
||||
--- dhcp-4.0.2.orig/server/dhcpd.c 2010-02-14 07:26:37.047800993 +0000
|
||||
+++ dhcp-4.0.2/server/dhcpd.c 2010-02-14 07:26:44.165800803 +0000
|
||||
@@ -62,6 +62,9 @@
|
||||
struct iaddr server_identifier;
|
||||
int server_identifier_matched;
|
||||
|
||||
+
|
||||
+extern int log_isc_blurb;
|
||||
+
|
||||
#if defined (NSUPDATE)
|
||||
|
||||
/* This stuff is always executed to figure the default values for certain
|
||||
@@ -354,6 +357,7 @@
|
||||
lftest = 1;
|
||||
log_perror = -1;
|
||||
} else if (!strcmp (argv [i], "-q")) {
|
||||
+ log_isc_blurb = 0;
|
||||
quiet = 1;
|
||||
quiet_interface_discovery = 1;
|
||||
#ifdef DHCPv6
|
@ -1,189 +0,0 @@
|
||||
diff -uNr dhcp-4.1.0.ORIG/client/scripts/bsdos dhcp-4.1.0/client/scripts/bsdos
|
||||
--- dhcp-4.1.0.ORIG/client/scripts/bsdos 2009-07-09 15:16:11.000000000 +0100
|
||||
+++ dhcp-4.1.0/client/scripts/bsdos 2009-07-09 15:17:41.000000000 +0100
|
||||
@@ -102,6 +102,9 @@
|
||||
if [ x$new_interface_mtu != x ]; then
|
||||
mtu_arg="mtu $new_interface_mtu"
|
||||
fi
|
||||
+if [ x$IF_METRIC != x ]; then
|
||||
+ metric_arg="metric $IF_METRIC"
|
||||
+fi
|
||||
|
||||
if [ x$reason = xMEDIUM ]; then
|
||||
eval "ifconfig $interface $medium"
|
||||
@@ -163,7 +166,7 @@
|
||||
if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
|
||||
[ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
|
||||
eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \
|
||||
- $new_broadcast_arg $mtu_arg $medium"
|
||||
+ $new_broadcast_arg $mtu_arg $metric_arg $medium"
|
||||
route add $new_ip_address 127.1 >/dev/null 2>&1
|
||||
for router in $new_routers; do
|
||||
route add default $router >/dev/null 2>&1
|
||||
@@ -220,7 +223,7 @@
|
||||
route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1
|
||||
fi
|
||||
eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \
|
||||
- $new_broadcast_arg $mtu_arg $medium"
|
||||
+ $new_broadcast_arg $mtu_arg $metric_arg $medium"
|
||||
sleep 1
|
||||
if [ "$new_routers" != "" ]; then
|
||||
set $new_routers
|
||||
diff -uNr dhcp-4.1.0.ORIG/client/scripts/freebsd dhcp-4.1.0/client/scripts/freebsd
|
||||
--- dhcp-4.1.0.ORIG/client/scripts/freebsd 2009-07-09 15:16:11.000000000 +0100
|
||||
+++ dhcp-4.1.0/client/scripts/freebsd 2009-07-09 15:17:41.000000000 +0100
|
||||
@@ -112,6 +112,9 @@
|
||||
if [ x$new_interface_mtu != x ]; then
|
||||
mtu_arg="mtu $new_interface_mtu"
|
||||
fi
|
||||
+if [ x$IF_METRIC != x ]; then
|
||||
+ metric_arg="metric $IF_METRIC"
|
||||
+fi
|
||||
|
||||
if [ x$reason = xMEDIUM ]; then
|
||||
eval "ifconfig $interface $medium"
|
||||
@@ -173,7 +176,7 @@
|
||||
if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
|
||||
[ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
|
||||
eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \
|
||||
- $new_broadcast_arg $mtu_arg $medium"
|
||||
+ $new_broadcast_arg $mtu_arg $metric_arg $medium"
|
||||
$LOGGER "New IP Address ($interface): $new_ip_address"
|
||||
$LOGGER "New Subnet Mask ($interface): $new_subnet_mask"
|
||||
$LOGGER "New Broadcast Address ($interface): $new_broadcast_address"
|
||||
@@ -243,7 +246,7 @@
|
||||
route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1
|
||||
fi
|
||||
eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \
|
||||
- $new_broadcast_arg $mtu_arg $medium"
|
||||
+ $new_broadcast_arg $mtu_arg $metric_arg $medium"
|
||||
$LOGGER "New IP Address ($interface): $new_ip_address"
|
||||
$LOGGER "New Subnet Mask ($interface): $new_subnet_mask"
|
||||
$LOGGER "New Broadcast Address ($interface): $new_broadcast_address"
|
||||
diff -uNr dhcp-4.1.0.ORIG/client/scripts/linux dhcp-4.1.0/client/scripts/linux
|
||||
--- dhcp-4.1.0.ORIG/client/scripts/linux 2009-07-09 15:16:11.000000000 +0100
|
||||
+++ dhcp-4.1.0/client/scripts/linux 2009-07-09 15:20:50.000000000 +0100
|
||||
@@ -104,11 +104,6 @@
|
||||
fi
|
||||
fi
|
||||
|
||||
-release=`uname -r`
|
||||
-release=`expr $release : '\(.*\)\..*'`
|
||||
-relminor=`echo $release |sed -e 's/[0-9]*\.\([0-9][0-9]*\)\(\..*\)*$/\1/'`
|
||||
-relmajor=`echo $release |sed -e 's/\([0-9][0-9]*\)\..*$/\1/'`
|
||||
-
|
||||
###
|
||||
### DHCPv4 Handlers
|
||||
###
|
||||
@@ -131,6 +126,9 @@
|
||||
if [ x$new_interface_mtu != x ]; then
|
||||
mtu_arg="mtu $new_interface_mtu"
|
||||
fi
|
||||
+if [ x$IF_METRIC != x ]; then
|
||||
+ metric_arg="metric $IF_METRIC"
|
||||
+fi
|
||||
|
||||
if [ x$reason = xMEDIUM ]; then
|
||||
# Linux doesn't do mediums (ok, ok, media).
|
||||
@@ -142,15 +140,7 @@
|
||||
# Bring down alias interface. Its routes will disappear too.
|
||||
ifconfig $interface:0- inet 0
|
||||
fi
|
||||
- if [ $relmajor -lt 2 ] || ( [ $relmajor -eq 2 ] && [ $relminor -eq 0 ] )
|
||||
- then
|
||||
- ifconfig $interface inet 0.0.0.0 netmask 0.0.0.0 \
|
||||
- broadcast 255.255.255.255 up
|
||||
- # Add route to make broadcast work. Do not omit netmask.
|
||||
- route add default dev $interface netmask 0.0.0.0
|
||||
- else
|
||||
- ifconfig $interface 0 up
|
||||
- fi
|
||||
+ ifconfig $interface 0 up
|
||||
|
||||
# We need to give the kernel some time to get the interface up.
|
||||
sleep 1
|
||||
@@ -192,15 +182,17 @@
|
||||
ifconfig $interface inet $new_ip_address $new_subnet_arg \
|
||||
$new_broadcast_arg $mtu_arg
|
||||
# Add a network route to the computed network address.
|
||||
- if [ $relmajor -lt 2 ] || \
|
||||
- ( [ $relmajor -eq 2 ] && [ $relminor -eq 0 ] ); then
|
||||
- route add -net $new_network_number $new_subnet_arg dev $interface
|
||||
+ if [ x$IF_METRIC != x ] && [ x$IF_METRIC != x0 ]; then
|
||||
+ route del -net $new_network_number $new_subnet_arg \
|
||||
+ dev $interface
|
||||
+ route add -net $new_network_number $new_subnet_arg $metric_arg \
|
||||
+ dev $interface
|
||||
fi
|
||||
for router in $new_routers; do
|
||||
if [ "x$new_subnet_mask" = "x255.255.255.255" ] ; then
|
||||
- route add -host $router dev $interface
|
||||
+ route add -host $router $metric_arg dev $interface
|
||||
fi
|
||||
- route add default gw $router
|
||||
+ route add default gw $router $metric_arg dev $interface
|
||||
done
|
||||
fi
|
||||
if [ x$new_ip_address != x$alias_ip_address ] && [ x$alias_ip_address != x ];
|
||||
diff -uNr dhcp-4.1.0.ORIG/client/scripts/netbsd dhcp-4.1.0/client/scripts/netbsd
|
||||
--- dhcp-4.1.0.ORIG/client/scripts/netbsd 2009-07-09 15:16:11.000000000 +0100
|
||||
+++ dhcp-4.1.0/client/scripts/netbsd 2009-07-09 15:17:41.000000000 +0100
|
||||
@@ -102,6 +102,9 @@
|
||||
if [ x$new_interface_mtu != x ]; then
|
||||
mtu_arg="mtu $new_interface_mtu"
|
||||
fi
|
||||
+if [ x$IF_METRIC != x ]; then
|
||||
+ metric_arg="metric $IF_METRIC"
|
||||
+fi
|
||||
|
||||
if [ x$reason = xMEDIUM ]; then
|
||||
eval "ifconfig $interface $medium"
|
||||
@@ -163,7 +166,7 @@
|
||||
if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
|
||||
[ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
|
||||
eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \
|
||||
- $new_broadcast_arg $mtu_arg $medium"
|
||||
+ $new_broadcast_arg $mtu_arg $metric_arg $medium"
|
||||
route add $new_ip_address 127.1 >/dev/null 2>&1
|
||||
for router in $new_routers; do
|
||||
route add default $router >/dev/null 2>&1
|
||||
@@ -220,7 +223,7 @@
|
||||
route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1
|
||||
fi
|
||||
eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \
|
||||
- $new_broadcast_arg $mtu_arg $medium"
|
||||
+ $new_broadcast_arg $mtu_arg $metric_arg $medium"
|
||||
sleep 1
|
||||
if [ "$new_routers" != "" ]; then
|
||||
set $new_routers
|
||||
diff -uNr dhcp-4.1.0.ORIG/client/scripts/solaris dhcp-4.1.0/client/scripts/solaris
|
||||
--- dhcp-4.1.0.ORIG/client/scripts/solaris 2009-07-09 15:16:11.000000000 +0100
|
||||
+++ dhcp-4.1.0/client/scripts/solaris 2009-07-09 15:17:41.000000000 +0100
|
||||
@@ -97,6 +97,9 @@
|
||||
if [ x$new_interface_mtu != x ]; then
|
||||
mtu_arg="mtu $new_interface_mtu"
|
||||
fi
|
||||
+if [ x$IF_METRIC != x ]; then
|
||||
+ metric_arg="metric $IF_METRIC"
|
||||
+fi
|
||||
|
||||
ifconfig=/sbin/ifconfig
|
||||
|
||||
@@ -159,7 +162,7 @@
|
||||
if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
|
||||
[ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
|
||||
eval "$ifconfig $interface inet $new_ip_address $new_netmask_arg \
|
||||
- $new_broadcast_arg $mtu_arg $medium"
|
||||
+ $new_broadcast_arg $mtu_arg $metric_arg $medium"
|
||||
route add $new_ip_address 127.1 1 >/dev/null 2>&1
|
||||
for router in $new_routers; do
|
||||
route add default $router 1 >/dev/null 2>&1
|
||||
@@ -200,7 +203,7 @@
|
||||
route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1
|
||||
fi
|
||||
eval "$ifconfig $interface inet $new_ip_address $new_netmask_arg \
|
||||
- $new_broadcast_arg $mtu_arg $medium"
|
||||
+ $new_broadcast_arg $mtu_arg $metric_arg $medium"
|
||||
sleep 1
|
||||
set $new_routers
|
||||
if ping -s -n -I 1 $1 64 1; then
|
@ -1,395 +0,0 @@
|
||||
Submitted By: Mario Fetka (mario dot fetka at gmail dot com)
|
||||
Date: 2010-11-11
|
||||
Initial Package Version: 4.1.2
|
||||
Origin: gentoo dhcp-4.0-dhclient-resolvconf.patch
|
||||
Upstream Status: unknown
|
||||
Description: add dhconfig resolveconf support
|
||||
|
||||
diff -Naur dhcp-4.1.2.orig/client/scripts/bsdos dhcp-4.1.2/client/scripts/bsdos
|
||||
--- dhcp-4.1.2.orig/client/scripts/bsdos 2010-11-11 19:44:00.000000000 +0000
|
||||
+++ dhcp-4.1.2/client/scripts/bsdos 2010-11-11 19:44:06.000000000 +0000
|
||||
@@ -1,34 +1,41 @@
|
||||
#!/bin/sh
|
||||
|
||||
make_resolv_conf() {
|
||||
+ if [ x"$PEER_DNS" != x ] && [ x$"PEER_DNS" != xyes ]; then
|
||||
+ return 0
|
||||
+ fi
|
||||
+ local conf=
|
||||
if [ x"$new_domain_name_servers" != x ]; then
|
||||
- cat /dev/null > /etc/resolv.conf.dhclient
|
||||
if [ "x$new_domain_search" != x ]; then
|
||||
- echo search $new_domain_search >> /etc/resolv.conf.dhclient
|
||||
+ conf="${conf}search ${new_domain_search}\n"
|
||||
elif [ "x$new_domain_name" != x ]; then
|
||||
# Note that the DHCP 'Domain Name Option' is really just a domain
|
||||
# name, and that this practice of using the domain name option as
|
||||
# a search path is both nonstandard and deprecated.
|
||||
- echo search $new_domain_name >> /etc/resolv.conf.dhclient
|
||||
+ conf="${conf}search ${new_domain_name}\n"
|
||||
fi
|
||||
for nameserver in $new_domain_name_servers; do
|
||||
- echo nameserver $nameserver >> /etc/resolv.conf.dhclient
|
||||
+ conf="${conf}nameserver ${nameserver}\n"
|
||||
done
|
||||
-
|
||||
- mv /etc/resolv.conf.dhclient /etc/resolv.conf
|
||||
elif [ "x${new_dhcp6_name_servers}" != x ] ; then
|
||||
- cat /dev/null > /etc/resolv.conf.dhclient6
|
||||
- chmod 644 /etc/resolv.conf.dhclient6
|
||||
-
|
||||
if [ "x${new_dhcp6_domain_search}" != x ] ; then
|
||||
- echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6
|
||||
+ conf="${conf}search ${new_dhcp6_domain_search}\n"
|
||||
fi
|
||||
for nameserver in ${new_dhcp6_name_servers} ; do
|
||||
- echo nameserver ${nameserver} >> /etc/resolv.conf.dhclient6
|
||||
+ conf="${conf}nameserver ${nameserver}\n"
|
||||
done
|
||||
+ fi
|
||||
|
||||
- mv /etc/resolv.conf.dhclient6 /etc/resolv.conf
|
||||
+ if [ x"$conf" != x ]; then
|
||||
+ conf="# Generated by dhclient or interface $interface\n${conf}"
|
||||
+ if type resolvconf >/dev/null 2>&1; then
|
||||
+ printf "${conf}" | resolvconf -a $interface
|
||||
+ else
|
||||
+ printf "${conf}" > /etc/resolv.conf
|
||||
+ chmod 644 /etc/resolv.conf
|
||||
+ fi
|
||||
fi
|
||||
+
|
||||
# If we're making confs, may as well make an ntp.conf too
|
||||
make_ntp_conf
|
||||
}
|
||||
diff -Naur dhcp-4.1.2.orig/client/scripts/freebsd dhcp-4.1.2/client/scripts/freebsd
|
||||
--- dhcp-4.1.2.orig/client/scripts/freebsd 2010-11-11 19:44:00.000000000 +0000
|
||||
+++ dhcp-4.1.2/client/scripts/freebsd 2010-11-11 19:44:06.000000000 +0000
|
||||
@@ -11,68 +11,41 @@
|
||||
fi
|
||||
|
||||
make_resolv_conf() {
|
||||
+ if [ x"$PEER_DNS" != x ] && [ x$"PEER_DNS" != xyes ]; then
|
||||
+ return 0
|
||||
+ fi
|
||||
+ local conf=
|
||||
if [ x"$new_domain_name_servers" != x ]; then
|
||||
- ( cat /dev/null > /etc/resolv.conf.dhclient )
|
||||
- exit_status=$?
|
||||
- if [ $exit_status -ne 0 ]; then
|
||||
- $LOGGER "Unable to create /etc/resolv.conf.dhclient: Error $exit_status"
|
||||
- else
|
||||
- if [ "x$new_domain_search" != x ]; then
|
||||
- ( echo search $new_domain_search >> /etc/resolv.conf.dhclient )
|
||||
- exit_status=$?
|
||||
- elif [ "x$new_domain_name" != x ]; then
|
||||
- # Note that the DHCP 'Domain Name Option' is really just a domain
|
||||
- # name, and that this practice of using the domain name option as
|
||||
- # a search path is both nonstandard and deprecated.
|
||||
- ( echo search $new_domain_name >> /etc/resolv.conf.dhclient )
|
||||
- exit_status=$?
|
||||
- fi
|
||||
- for nameserver in $new_domain_name_servers; do
|
||||
- if [ $exit_status -ne 0 ]; then
|
||||
- break
|
||||
- fi
|
||||
- ( echo nameserver $nameserver >>/etc/resolv.conf.dhclient )
|
||||
- exit_status=$?
|
||||
- done
|
||||
-
|
||||
- # If there were no errors, attempt to mv the new file into place.
|
||||
- if [ $exit_status -eq 0 ]; then
|
||||
- ( mv /etc/resolv.conf.dhclient /etc/resolv.conf )
|
||||
- exit_status=$?
|
||||
- fi
|
||||
-
|
||||
- if [ $exit_status -ne 0 ]; then
|
||||
- $LOGGER "Error while writing new /etc/resolv.conf."
|
||||
- fi
|
||||
+ if [ "x$new_domain_search" != x ]; then
|
||||
+ conf="${conf}search ${new_domain_search}\n"
|
||||
+ elif [ "x$new_domain_name" != x ]; then
|
||||
+ # Note that the DHCP 'Domain Name Option' is really just a domain
|
||||
+ # name, and that this practice of using the domain name option as
|
||||
+ # a search path is both nonstandard and deprecated.
|
||||
+ conf="${conf}search ${new_domain_name}\n"
|
||||
fi
|
||||
+ for nameserver in $new_domain_name_servers; do
|
||||
+ conf="${conf}nameserver ${nameserver}\n"
|
||||
+ done
|
||||
elif [ "x${new_dhcp6_name_servers}" != x ] ; then
|
||||
- ( cat /dev/null > /etc/resolv.conf.dhclient6 )
|
||||
- exit_status=$?
|
||||
- if [ $exit_status -ne 0 ] ; then
|
||||
- $LOGGER "Unable to create /etc/resolv.conf.dhclient6: Error $exit_status"
|
||||
- else
|
||||
- if [ "x${new_dhcp6_domain_search}" != x ] ; then
|
||||
- ( echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6 )
|
||||
- exit_status=$?
|
||||
- fi
|
||||
- for nameserver in ${new_dhcp6_name_servers} ; do
|
||||
- if [ $exit_status -ne 0 ] ; then
|
||||
- break
|
||||
- fi
|
||||
- ( echo nameserver ${nameserver} >> /etc/resolv.conf.dhclient6 )
|
||||
- exit_status=$?
|
||||
- done
|
||||
-
|
||||
- if [ $exit_status -eq 0 ] ; then
|
||||
- ( mv /etc/resolv.conf.dhclient6 /etc/resolv.conf )
|
||||
- exit_status=$?
|
||||
- fi
|
||||
+ if [ "x${new_dhcp6_domain_search}" != x ] ; then
|
||||
+ conf="${conf}search ${new_dhcp6_domain_search}\n"
|
||||
+ fi
|
||||
+ for nameserver in ${new_dhcp6_name_servers} ; do
|
||||
+ conf="${conf}nameserver ${nameserver}\n"
|
||||
+ done
|
||||
+ fi
|
||||
|
||||
- if [ $exit_status -ne 0 ] ; then
|
||||
- $LOGGER "Error while writing new /etc/resolv.conf."
|
||||
- fi
|
||||
+ if [ x"$conf" != x ]; then
|
||||
+ conf="# Generated by dhclient or interface $interface\n${conf}"
|
||||
+ if type resolvconf >/dev/null 2>&1; then
|
||||
+ printf "${conf}" | resolvconf -a $interface
|
||||
+ else
|
||||
+ printf "${conf}" > /etc/resolv.conf
|
||||
+ chmod 644 /etc/resolv.conf
|
||||
fi
|
||||
fi
|
||||
+
|
||||
# If we're making confs, may as well make an ntp.conf too
|
||||
make_ntp_conf
|
||||
}
|
||||
diff -Naur dhcp-4.1.2.orig/client/scripts/linux dhcp-4.1.2/client/scripts/linux
|
||||
--- dhcp-4.1.2.orig/client/scripts/linux 2010-11-11 19:44:00.000000000 +0000
|
||||
+++ dhcp-4.1.2/client/scripts/linux 2010-11-11 19:44:06.000000000 +0000
|
||||
@@ -26,35 +26,41 @@
|
||||
ip=/sbin/ip
|
||||
|
||||
make_resolv_conf() {
|
||||
+ if [ x"$PEER_DNS" != x ] && [ x$"PEER_DNS" != xyes ]; then
|
||||
+ return 0
|
||||
+ fi
|
||||
+ local conf=
|
||||
if [ x"$new_domain_name_servers" != x ]; then
|
||||
- cat /dev/null > /etc/resolv.conf.dhclient
|
||||
- chmod 644 /etc/resolv.conf.dhclient
|
||||
- if [ x"$new_domain_search" != x ]; then
|
||||
- echo search $new_domain_search >> /etc/resolv.conf.dhclient
|
||||
- elif [ x"$new_domain_name" != x ]; then
|
||||
+ if [ "x$new_domain_search" != x ]; then
|
||||
+ conf="${conf}search ${new_domain_search}\n"
|
||||
+ elif [ "x$new_domain_name" != x ]; then
|
||||
# Note that the DHCP 'Domain Name Option' is really just a domain
|
||||
# name, and that this practice of using the domain name option as
|
||||
# a search path is both nonstandard and deprecated.
|
||||
- echo search $new_domain_name >> /etc/resolv.conf.dhclient
|
||||
+ conf="${conf}search ${new_domain_name}\n"
|
||||
fi
|
||||
for nameserver in $new_domain_name_servers; do
|
||||
- echo nameserver $nameserver >>/etc/resolv.conf.dhclient
|
||||
+ conf="${conf}nameserver ${nameserver}\n"
|
||||
done
|
||||
-
|
||||
- mv /etc/resolv.conf.dhclient /etc/resolv.conf
|
||||
elif [ "x${new_dhcp6_name_servers}" != x ] ; then
|
||||
- cat /dev/null > /etc/resolv.conf.dhclient6
|
||||
- chmod 644 /etc/resolv.conf.dhclient6
|
||||
-
|
||||
if [ "x${new_dhcp6_domain_search}" != x ] ; then
|
||||
- echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6
|
||||
+ conf="${conf}search ${new_dhcp6_domain_search}\n"
|
||||
fi
|
||||
for nameserver in ${new_dhcp6_name_servers} ; do
|
||||
- echo nameserver ${nameserver} >> /etc/resolv.conf.dhclient6
|
||||
+ conf="${conf}nameserver ${nameserver}\n"
|
||||
done
|
||||
+ fi
|
||||
|
||||
- mv /etc/resolv.conf.dhclient6 /etc/resolv.conf
|
||||
+ if [ x"$conf" != x ]; then
|
||||
+ conf="# Generated by dhclient or interface $interface\n${conf}"
|
||||
+ if type resolvconf >/dev/null 2>&1; then
|
||||
+ printf "${conf}" | resolvconf -a $interface
|
||||
+ else
|
||||
+ printf "${conf}" > /etc/resolv.conf
|
||||
+ chmod 644 /etc/resolv.conf
|
||||
+ fi
|
||||
fi
|
||||
+
|
||||
# If we're making confs, may as well make an ntp.conf too
|
||||
make_ntp_conf
|
||||
}
|
||||
diff -Naur dhcp-4.1.2.orig/client/scripts/netbsd dhcp-4.1.2/client/scripts/netbsd
|
||||
--- dhcp-4.1.2.orig/client/scripts/netbsd 2010-11-11 19:44:00.000000000 +0000
|
||||
+++ dhcp-4.1.2/client/scripts/netbsd 2010-11-11 19:44:40.000000000 +0000
|
||||
@@ -1,34 +1,41 @@
|
||||
#!/bin/sh
|
||||
|
||||
make_resolv_conf() {
|
||||
- if [ "x$new_domain_name" != x ] && [ x"$new_domain_name_servers" != x ]; then
|
||||
- cat /dev/null > /etc/resolv.conf.dhclient
|
||||
+ if [ x"$PEER_DNS" != x ] && [ x$"PEER_DNS" != xyes ]; then
|
||||
+ return 0
|
||||
+ fi
|
||||
+ local conf=
|
||||
+ if [ x"$new_domain_name_servers" != x ]; then
|
||||
if [ "x$new_domain_search" != x ]; then
|
||||
- echo search $new_domain_search >> /etc/resolv.conf.dhclient
|
||||
+ conf="${conf}search ${new_domain_search}\n"
|
||||
elif [ "x$new_domain_name" != x ]; then
|
||||
# Note that the DHCP 'Domain Name Option' is really just a domain
|
||||
# name, and that this practice of using the domain name option as
|
||||
# a search path is both nonstandard and deprecated.
|
||||
- echo search $new_domain_name >> /etc/resolv.conf.dhclient
|
||||
+ conf="${conf}search ${new_domain_name}\n"
|
||||
fi
|
||||
for nameserver in $new_domain_name_servers; do
|
||||
- echo nameserver $nameserver >>/etc/resolv.conf.dhclient
|
||||
+ conf="${conf}nameserver ${nameserver}\n"
|
||||
done
|
||||
-
|
||||
- mv /etc/resolv.conf.dhclient /etc/resolv.conf
|
||||
elif [ "x${new_dhcp6_name_servers}" != x ] ; then
|
||||
- cat /dev/null > /etc/resolv.conf.dhclient6
|
||||
- chmod 644 /etc/resolv.conf.dhclient6
|
||||
-
|
||||
if [ "x${new_dhcp6_domain_search}" != x ] ; then
|
||||
- echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6
|
||||
+ conf="${conf}search ${new_dhcp6_domain_search}\n"
|
||||
fi
|
||||
for nameserver in ${new_dhcp6_name_servers} ; do
|
||||
- echo nameserver ${nameserver} >> /etc/resolv.conf.dhclient6
|
||||
+ conf="${conf}nameserver ${nameserver}\n"
|
||||
done
|
||||
+ fi
|
||||
|
||||
- mv /etc/resolv.conf.dhclient6 /etc/resolv.conf
|
||||
+ if [ x"$conf" != x ]; then
|
||||
+ conf="# Generated by dhclient or interface $interface\n${conf}"
|
||||
+ if type resolvconf >/dev/null 2>&1; then
|
||||
+ printf "${conf}" | resolvconf -a $interface
|
||||
+ else
|
||||
+ printf "${conf}" > /etc/resolv.conf
|
||||
+ chmod 644 /etc/resolv.conf
|
||||
+ fi
|
||||
fi
|
||||
+
|
||||
# If we're making confs, may as well make an ntp.conf too
|
||||
make_ntp_conf
|
||||
}
|
||||
diff -Naur dhcp-4.1.2.orig/client/scripts/openbsd dhcp-4.1.2/client/scripts/openbsd
|
||||
--- dhcp-4.1.2.orig/client/scripts/openbsd 2010-11-11 19:44:00.000000000 +0000
|
||||
+++ dhcp-4.1.2/client/scripts/openbsd 2010-11-11 19:44:06.000000000 +0000
|
||||
@@ -1,34 +1,41 @@
|
||||
#!/bin/sh
|
||||
|
||||
make_resolv_conf() {
|
||||
- if x"$new_domain_name_servers" != x ]; then
|
||||
- cat /dev/null > /etc/resolv.conf.dhclient
|
||||
- if [ x"$new_domain_search" != x ]; then
|
||||
- echo search $new_domain_search >> /etc/resolv.conf.dhclient
|
||||
- elif [ x"$new_domain_name" != x ]; then
|
||||
+ if [ x"$PEER_DNS" != x ] && [ x$"PEER_DNS" != xyes ]; then
|
||||
+ return 0
|
||||
+ fi
|
||||
+ local conf=
|
||||
+ if [ x"$new_domain_name_servers" != x ]; then
|
||||
+ if [ "x$new_domain_search" != x ]; then
|
||||
+ conf="${conf}search ${new_domain_search}\n"
|
||||
+ elif [ "x$new_domain_name" != x ]; then
|
||||
# Note that the DHCP 'Domain Name Option' is really just a domain
|
||||
# name, and that this practice of using the domain name option as
|
||||
# a search path is both nonstandard and deprecated.
|
||||
- echo search $new_domain_name >> /etc/resolv.conf.dhclient
|
||||
+ conf="${conf}search ${new_domain_name}\n"
|
||||
fi
|
||||
for nameserver in $new_domain_name_servers; do
|
||||
- echo nameserver $nameserver >>/etc/resolv.conf.dhclient
|
||||
+ conf="${conf}nameserver ${nameserver}\n"
|
||||
done
|
||||
-
|
||||
- mv /etc/ersolv.conf.dhclient /etc/resolv.conf
|
||||
elif [ "x${new_dhcp6_name_servers}" != x ] ; then
|
||||
- cat /dev/null > /etc/resolv.conf.dhclient6
|
||||
- chmod 644 /etc/resolv.conf.dhclient6
|
||||
-
|
||||
if [ "x${new_dhcp6_domain_search}" != x ] ; then
|
||||
- echo search ${new_dhcp6_domain_search} >> /etc/resolv.conf.dhclient6
|
||||
+ conf="${conf}search ${new_dhcp6_domain_search}\n"
|
||||
fi
|
||||
for nameserver in ${new_dhcp6_name_servers} ; do
|
||||
- echo nameserver ${nameserver} >> /etc/resolv.conf.dhclient6
|
||||
+ conf="${conf}nameserver ${nameserver}\n"
|
||||
done
|
||||
+ fi
|
||||
|
||||
- mv /etc/resolv.conf.dhclient6 /etc/resolv.conf
|
||||
+ if [ x"$conf" != x ]; then
|
||||
+ conf="# Generated by dhclient or interface $interface\n${conf}"
|
||||
+ if type resolvconf >/dev/null 2>&1; then
|
||||
+ printf "${conf}" | resolvconf -a $interface
|
||||
+ else
|
||||
+ printf "${conf}" > /etc/resolv.conf
|
||||
+ chmod 644 /etc/resolv.conf
|
||||
+ fi
|
||||
fi
|
||||
+
|
||||
# If we're making confs, may as well make an ntp.conf too
|
||||
make_ntp_conf
|
||||
}
|
||||
diff -Naur dhcp-4.1.2.orig/client/scripts/solaris dhcp-4.1.2/client/scripts/solaris
|
||||
--- dhcp-4.1.2.orig/client/scripts/solaris 2010-11-11 19:44:00.000000000 +0000
|
||||
+++ dhcp-4.1.2/client/scripts/solaris 2010-11-11 19:44:06.000000000 +0000
|
||||
@@ -1,22 +1,41 @@
|
||||
#!/bin/sh
|
||||
|
||||
make_resolv_conf() {
|
||||
+ if [ x"$PEER_DNS" != x ] && [ x$"PEER_DNS" != xyes ]; then
|
||||
+ return 0
|
||||
+ fi
|
||||
+ local conf=
|
||||
if [ x"$new_domain_name_servers" != x ]; then
|
||||
- cat /dev/null > /etc/resolv.conf.dhclient
|
||||
- if [ x"$new_domain_search" != x ]; then
|
||||
- echo search $new_domain_search >> /etc/resolv.conf.dhclient
|
||||
- elif [ x"$new_domain_name" != x ]; then
|
||||
+ if [ "x$new_domain_search" != x ]; then
|
||||
+ conf="${conf}search ${new_domain_search}\n"
|
||||
+ elif [ "x$new_domain_name" != x ]; then
|
||||
# Note that the DHCP 'Domain Name Option' is really just a domain
|
||||
# name, and that this practice of using the domain name option as
|
||||
# a search path is both nonstandard and deprecated.
|
||||
- echo search $new_domain_name >> /etc/resolv.conf.dhclient
|
||||
+ conf="${conf}search ${new_domain_name}\n"
|
||||
fi
|
||||
for nameserver in $new_domain_name_servers; do
|
||||
- echo nameserver $nameserver >>/etc/resolv.conf.dhclient
|
||||
+ conf="${conf}nameserver ${nameserver}\n"
|
||||
+ done
|
||||
+ elif [ "x${new_dhcp6_name_servers}" != x ] ; then
|
||||
+ if [ "x${new_dhcp6_domain_search}" != x ] ; then
|
||||
+ conf="${conf}search ${new_dhcp6_domain_search}\n"
|
||||
+ fi
|
||||
+ for nameserver in ${new_dhcp6_name_servers} ; do
|
||||
+ conf="${conf}nameserver ${nameserver}\n"
|
||||
done
|
||||
+ fi
|
||||
|
||||
- mv /etc/resolv.conf.dhclient /etc/resolv.conf
|
||||
+ if [ x"$conf" != x ]; then
|
||||
+ conf="# Generated by dhclient or interface $interface\n${conf}"
|
||||
+ if type resolvconf >/dev/null 2>&1; then
|
||||
+ printf "${conf}" | resolvconf -a $interface
|
||||
+ else
|
||||
+ printf "${conf}" > /etc/resolv.conf
|
||||
+ chmod 644 /etc/resolv.conf
|
||||
+ fi
|
||||
fi
|
||||
+
|
||||
# If we're making confs, may as well make an ntp.conf too
|
||||
make_ntp_conf
|
||||
}
|
@ -1,96 +0,0 @@
|
||||
diff -uNr dhcp-4.1.0.ORIG/client/dhclient.c dhcp-4.1.0/client/dhclient.c
|
||||
--- dhcp-4.1.0.ORIG/client/dhclient.c 2009-07-09 15:29:40.000000000 +0100
|
||||
+++ dhcp-4.1.0/client/dhclient.c 2009-07-09 15:30:19.000000000 +0100
|
||||
@@ -87,6 +87,8 @@
|
||||
|
||||
static isc_result_t write_duid(struct data_string *duid);
|
||||
|
||||
+extern int log_isc_blurb;
|
||||
+
|
||||
int
|
||||
main(int argc, char **argv) {
|
||||
int fd;
|
||||
@@ -385,6 +387,7 @@
|
||||
log_info("%s", "");
|
||||
} else {
|
||||
log_perror = 0;
|
||||
+ log_isc_blurb = 0;
|
||||
quiet_interface_discovery = 1;
|
||||
}
|
||||
|
||||
diff -uNr dhcp-4.1.0.ORIG/omapip/errwarn.c dhcp-4.1.0/omapip/errwarn.c
|
||||
--- dhcp-4.1.0.ORIG/omapip/errwarn.c 2009-07-09 15:29:40.000000000 +0100
|
||||
+++ dhcp-4.1.0/omapip/errwarn.c 2009-07-09 15:29:52.000000000 +0100
|
||||
@@ -43,6 +43,8 @@
|
||||
int log_perror = 1;
|
||||
#endif
|
||||
int log_priority;
|
||||
+int log_isc_blurb=1;
|
||||
+
|
||||
void (*log_cleanup) (void);
|
||||
|
||||
#define CVT_BUF_MAX 1023
|
||||
@@ -74,7 +76,9 @@
|
||||
write (STDERR_FILENO, "\n", 1);
|
||||
}
|
||||
|
||||
-#if !defined (NOMINUM)
|
||||
+#if !defined(NOMINUM)
|
||||
+ if ( log_isc_blurb )
|
||||
+ {
|
||||
log_error ("%s", "");
|
||||
log_error ("If you did not get this software from ftp.isc.org, please");
|
||||
log_error ("get the latest from ftp.isc.org and install that before");
|
||||
@@ -92,7 +96,12 @@
|
||||
log_error ("the README file.");
|
||||
log_error ("%s", "");
|
||||
log_error ("exiting.");
|
||||
+ }else
|
||||
+ {
|
||||
+ log_error ("exiting.");
|
||||
+ }
|
||||
#endif
|
||||
+
|
||||
if (log_cleanup)
|
||||
(*log_cleanup) ();
|
||||
exit (1);
|
||||
diff -uNr dhcp-4.1.0.ORIG/relay/dhcrelay.c dhcp-4.1.0/relay/dhcrelay.c
|
||||
--- dhcp-4.1.0.ORIG/relay/dhcrelay.c 2009-07-09 15:29:40.000000000 +0100
|
||||
+++ dhcp-4.1.0/relay/dhcrelay.c 2009-07-09 15:31:53.000000000 +0100
|
||||
@@ -130,6 +130,7 @@
|
||||
static char arr[] = "All rights reserved.";
|
||||
static char message[] = "Internet Systems Consortium DHCP Relay Agent";
|
||||
static char url[] = "For info, please visit http://www.isc.org/sw/dhcp/";
|
||||
+extern int log_isc_blurb;
|
||||
|
||||
#ifdef DHCPv6
|
||||
#define DHCRELAY_USAGE \
|
||||
@@ -219,6 +220,7 @@
|
||||
} else if (!strcmp(argv[i], "-q")) {
|
||||
quiet = 1;
|
||||
quiet_interface_discovery = 1;
|
||||
+ log_isc_blurb = 0;
|
||||
} else if (!strcmp(argv[i], "-p")) {
|
||||
if (++i == argc)
|
||||
usage();
|
||||
diff -uNr dhcp-4.1.0.ORIG/server/dhcpd.c dhcp-4.1.0/server/dhcpd.c
|
||||
--- dhcp-4.1.0.ORIG/server/dhcpd.c 2009-07-09 15:29:40.000000000 +0100
|
||||
+++ dhcp-4.1.0/server/dhcpd.c 2009-07-09 15:29:52.000000000 +0100
|
||||
@@ -62,6 +62,9 @@
|
||||
struct iaddr server_identifier;
|
||||
int server_identifier_matched;
|
||||
|
||||
+
|
||||
+extern int log_isc_blurb;
|
||||
+
|
||||
#if defined (NSUPDATE)
|
||||
|
||||
/* This stuff is always executed to figure the default values for certain
|
||||
@@ -367,6 +370,7 @@
|
||||
lftest = 1;
|
||||
log_perror = -1;
|
||||
} else if (!strcmp (argv [i], "-q")) {
|
||||
+ log_isc_blurb = 0;
|
||||
quiet = 1;
|
||||
quiet_interface_discovery = 1;
|
||||
#ifdef DHCPv6
|
@ -1,103 +0,0 @@
|
||||
Submitted By: Mario Fetka (geos_one) (mario dot fetka at gmail dot com)
|
||||
Date: 2010-02-14
|
||||
Initial Package Version:
|
||||
Origin: gentoo patch dhcp-4.1-no_isc_blurb.patch
|
||||
Upstream Status:
|
||||
Description:
|
||||
|
||||
diff -Naur dhcp-4.1.1.orig/client/dhclient.c dhcp-4.1.1/client/dhclient.c
|
||||
--- dhcp-4.1.1.orig/client/dhclient.c 2010-02-14 07:43:04.825799868 +0000
|
||||
+++ dhcp-4.1.1/client/dhclient.c 2010-02-14 07:43:20.842552286 +0000
|
||||
@@ -89,6 +89,8 @@
|
||||
|
||||
static isc_result_t write_duid(struct data_string *duid);
|
||||
|
||||
+extern int log_isc_blurb;
|
||||
+
|
||||
int
|
||||
main(int argc, char **argv) {
|
||||
int fd;
|
||||
@@ -387,6 +389,7 @@
|
||||
log_info("%s", "");
|
||||
} else {
|
||||
log_perror = 0;
|
||||
+ log_isc_blurb = 0;
|
||||
quiet_interface_discovery = 1;
|
||||
}
|
||||
|
||||
diff -Naur dhcp-4.1.1.orig/omapip/errwarn.c dhcp-4.1.1/omapip/errwarn.c
|
||||
--- dhcp-4.1.1.orig/omapip/errwarn.c 2010-02-14 07:43:04.815800563 +0000
|
||||
+++ dhcp-4.1.1/omapip/errwarn.c 2010-02-14 07:43:20.842552286 +0000
|
||||
@@ -43,6 +43,8 @@
|
||||
int log_perror = 1;
|
||||
#endif
|
||||
int log_priority;
|
||||
+int log_isc_blurb=1;
|
||||
+
|
||||
void (*log_cleanup) (void);
|
||||
|
||||
#define CVT_BUF_MAX 1023
|
||||
@@ -74,7 +76,9 @@
|
||||
IGNORE_RET (write (STDERR_FILENO, "\n", 1));
|
||||
}
|
||||
|
||||
-#if !defined (NOMINUM)
|
||||
+#if !defined(NOMINUM)
|
||||
+ if ( log_isc_blurb )
|
||||
+ {
|
||||
log_error ("%s", "");
|
||||
log_error ("If you did not get this software from ftp.isc.org, please");
|
||||
log_error ("get the latest from ftp.isc.org and install that before");
|
||||
@@ -92,7 +96,12 @@
|
||||
log_error ("the README file.");
|
||||
log_error ("%s", "");
|
||||
log_error ("exiting.");
|
||||
+ }else
|
||||
+ {
|
||||
+ log_error ("exiting.");
|
||||
+ }
|
||||
#endif
|
||||
+
|
||||
if (log_cleanup)
|
||||
(*log_cleanup) ();
|
||||
exit (1);
|
||||
diff -Naur dhcp-4.1.1.orig/relay/dhcrelay.c dhcp-4.1.1/relay/dhcrelay.c
|
||||
--- dhcp-4.1.1.orig/relay/dhcrelay.c 2010-02-14 07:43:04.821800048 +0000
|
||||
+++ dhcp-4.1.1/relay/dhcrelay.c 2010-02-14 07:43:44.269801278 +0000
|
||||
@@ -133,6 +133,7 @@
|
||||
"Internet Systems Consortium DHCP Relay Agent";
|
||||
static const char url[] =
|
||||
"For info, please visit https://www.isc.org/software/dhcp/";
|
||||
+extern int log_isc_blurb;
|
||||
|
||||
#ifdef DHCPv6
|
||||
#define DHCRELAY_USAGE \
|
||||
@@ -222,6 +223,7 @@
|
||||
} else if (!strcmp(argv[i], "-q")) {
|
||||
quiet = 1;
|
||||
quiet_interface_discovery = 1;
|
||||
+ log_isc_blurb = 0;
|
||||
} else if (!strcmp(argv[i], "-p")) {
|
||||
if (++i == argc)
|
||||
usage();
|
||||
diff -Naur dhcp-4.1.1.orig/server/dhcpd.c dhcp-4.1.1/server/dhcpd.c
|
||||
--- dhcp-4.1.1.orig/server/dhcpd.c 2010-02-14 07:43:04.841800124 +0000
|
||||
+++ dhcp-4.1.1/server/dhcpd.c 2010-02-14 07:43:20.844551951 +0000
|
||||
@@ -63,6 +63,9 @@
|
||||
struct iaddr server_identifier;
|
||||
int server_identifier_matched;
|
||||
|
||||
+
|
||||
+extern int log_isc_blurb;
|
||||
+
|
||||
#if defined (NSUPDATE)
|
||||
|
||||
/* This stuff is always executed to figure the default values for certain
|
||||
@@ -360,6 +363,7 @@
|
||||
lftest = 1;
|
||||
log_perror = -1;
|
||||
} else if (!strcmp (argv [i], "-q")) {
|
||||
+ log_isc_blurb = 0;
|
||||
quiet = 1;
|
||||
quiet_interface_discovery = 1;
|
||||
#ifdef DHCPv6
|
@ -1,45 +0,0 @@
|
||||
diff -uNr dhcp-4.2.0.orig//common/bpf.c dhcp-4.2.0/common/bpf.c
|
||||
--- dhcp-4.2.0.orig//common/bpf.c 2010-08-24 21:05:43.000000000 +0200
|
||||
+++ dhcp-4.2.0/common/bpf.c 2010-08-24 21:08:59.000000000 +0200
|
||||
@@ -358,9 +358,9 @@
|
||||
struct iovec iov [3];
|
||||
int result;
|
||||
|
||||
- if (!strcmp (interface -> name, "fallback"))
|
||||
+/* if (!strcmp (interface -> name, "fallback"))
|
||||
return send_fallback (interface, packet, raw,
|
||||
- len, from, to, hto);
|
||||
+ len, from, to, hto); */
|
||||
|
||||
if (hto == NULL && interface->anycast_mac_addr.hlen)
|
||||
hto = &interface->anycast_mac_addr;
|
||||
@@ -537,7 +537,7 @@
|
||||
|
||||
void maybe_setup_fallback ()
|
||||
{
|
||||
- isc_result_t status;
|
||||
+/* isc_result_t status;
|
||||
struct interface_info *fbi = (struct interface_info *)0;
|
||||
if (setup_fallback (&fbi, MDL)) {
|
||||
if_register_fallback (fbi);
|
||||
@@ -548,7 +548,7 @@
|
||||
log_fatal ("Can't register I/O handle for %s: %s",
|
||||
fbi -> name, isc_result_totext (status));
|
||||
interface_dereference (&fbi, MDL);
|
||||
- }
|
||||
+ } */
|
||||
}
|
||||
|
||||
void
|
||||
diff -uNr dhcp-4.2.0.orig//includes/osdep.h dhcp-4.2.0/includes/osdep.h
|
||||
--- dhcp-4.2.0.orig//includes/osdep.h 2010-08-24 21:05:43.000000000 +0200
|
||||
+++ dhcp-4.2.0/includes/osdep.h 2010-08-24 21:06:07.000000000 +0200
|
||||
@@ -157,7 +157,7 @@
|
||||
Currently, all low-level packet interfaces use BSD sockets as a
|
||||
fallback. */
|
||||
|
||||
-#if defined (USE_BPF_SEND) || defined (USE_NIT_SEND) || \
|
||||
+#if defined (USE_NIT_SEND) || \
|
||||
defined (USE_DLPI_SEND) || defined (USE_UPF_SEND) || \
|
||||
defined (USE_LPF_SEND) || \
|
||||
(defined (USE_SOCKET_SEND) && defined (HAVE_SO_BINDTODEVICE))
|
@ -1,103 +0,0 @@
|
||||
Submitted By: Your Name (your at email dot address)
|
||||
Date: 2010-08-24
|
||||
Initial Package Version: 4.1
|
||||
Origin: Gentoo patch
|
||||
Upstream Status: unknown
|
||||
Description: remove isc blurb
|
||||
|
||||
diff -Naur dhcp-4.2.0.orig/client/dhclient.c dhcp-4.2.0/client/dhclient.c
|
||||
--- dhcp-4.2.0.orig/client/dhclient.c 2010-08-24 19:00:10.000000000 +0000
|
||||
+++ dhcp-4.2.0/client/dhclient.c 2010-08-24 19:00:35.000000000 +0000
|
||||
@@ -89,6 +89,8 @@
|
||||
|
||||
static isc_result_t write_duid(struct data_string *duid);
|
||||
|
||||
+extern int log_isc_blurb;
|
||||
+
|
||||
int
|
||||
main(int argc, char **argv) {
|
||||
int fd;
|
||||
@@ -408,6 +410,7 @@
|
||||
log_info("%s", "");
|
||||
} else {
|
||||
log_perror = 0;
|
||||
+ log_isc_blurb = 0;
|
||||
quiet_interface_discovery = 1;
|
||||
}
|
||||
|
||||
diff -Naur dhcp-4.2.0.orig/omapip/errwarn.c dhcp-4.2.0/omapip/errwarn.c
|
||||
--- dhcp-4.2.0.orig/omapip/errwarn.c 2010-08-24 19:00:10.000000000 +0000
|
||||
+++ dhcp-4.2.0/omapip/errwarn.c 2010-08-24 19:00:35.000000000 +0000
|
||||
@@ -43,6 +43,8 @@
|
||||
int log_perror = 1;
|
||||
#endif
|
||||
int log_priority;
|
||||
+int log_isc_blurb=1;
|
||||
+
|
||||
void (*log_cleanup) (void);
|
||||
|
||||
#define CVT_BUF_MAX 1023
|
||||
@@ -74,7 +76,9 @@
|
||||
IGNORE_RET (write (STDERR_FILENO, "\n", 1));
|
||||
}
|
||||
|
||||
-#if !defined (NOMINUM)
|
||||
+#if !defined(NOMINUM)
|
||||
+ if ( log_isc_blurb )
|
||||
+ {
|
||||
log_error ("%s", "");
|
||||
log_error ("If you did not get this software from ftp.isc.org, please");
|
||||
log_error ("get the latest from ftp.isc.org and install that before");
|
||||
@@ -92,7 +96,12 @@
|
||||
log_error ("the README file.");
|
||||
log_error ("%s", "");
|
||||
log_error ("exiting.");
|
||||
+ }else
|
||||
+ {
|
||||
+ log_error ("exiting.");
|
||||
+ }
|
||||
#endif
|
||||
+
|
||||
if (log_cleanup)
|
||||
(*log_cleanup) ();
|
||||
exit (1);
|
||||
diff -Naur dhcp-4.2.0.orig/relay/dhcrelay.c dhcp-4.2.0/relay/dhcrelay.c
|
||||
--- dhcp-4.2.0.orig/relay/dhcrelay.c 2010-08-24 19:00:10.000000000 +0000
|
||||
+++ dhcp-4.2.0/relay/dhcrelay.c 2010-08-24 19:01:47.000000000 +0000
|
||||
@@ -133,6 +133,7 @@
|
||||
"Internet Systems Consortium DHCP Relay Agent";
|
||||
static const char url[] =
|
||||
"For info, please visit https://www.isc.org/software/dhcp/";
|
||||
+extern int log_isc_blurb;
|
||||
|
||||
#ifdef DHCPv6
|
||||
#define DHCRELAY_USAGE \
|
||||
@@ -228,6 +229,7 @@
|
||||
} else if (!strcmp(argv[i], "-q")) {
|
||||
quiet = 1;
|
||||
quiet_interface_discovery = 1;
|
||||
+ log_isc_blurb = 0;
|
||||
} else if (!strcmp(argv[i], "-p")) {
|
||||
if (++i == argc)
|
||||
usage();
|
||||
diff -Naur dhcp-4.2.0.orig/server/dhcpd.c dhcp-4.2.0/server/dhcpd.c
|
||||
--- dhcp-4.2.0.orig/server/dhcpd.c 2010-08-24 19:00:10.000000000 +0000
|
||||
+++ dhcp-4.2.0/server/dhcpd.c 2010-08-24 19:00:35.000000000 +0000
|
||||
@@ -63,6 +63,9 @@
|
||||
struct iaddr server_identifier;
|
||||
int server_identifier_matched;
|
||||
|
||||
+
|
||||
+extern int log_isc_blurb;
|
||||
+
|
||||
#if defined (NSUPDATE)
|
||||
|
||||
/* This stuff is always executed to figure the default values for certain
|
||||
@@ -367,6 +370,7 @@
|
||||
lftest = 1;
|
||||
log_perror = -1;
|
||||
} else if (!strcmp (argv [i], "-q")) {
|
||||
+ log_isc_blurb = 0;
|
||||
quiet = 1;
|
||||
quiet_interface_discovery = 1;
|
||||
#ifdef DHCPv6
|
Loading…
Reference in New Issue
Block a user