Permalink
Browse files

FL-754: openresolv update

  • Loading branch information...
1 parent 345e471 commit 9c71f5216d646d9a177d112b99e36f6a7b2eb17f @angryvincent angryvincent committed Sep 23, 2013
Showing with 69 additions and 0 deletions.
  1. +1 −0 net-dns/openresolv/Manifest
  2. +20 −0 net-dns/openresolv/files/restartcmd
  3. +48 −0 net-dns/openresolv/openresolv-3.5.6.ebuild
@@ -2,3 +2,4 @@ DIST openresolv-3.3.4.tar.bz2 10495 SHA256 8288e436c67e0f85bdda25916f6daba78009a
DIST openresolv-3.4.1.tar.bz2 12741 SHA256 c01c7fee00f8582658753cc15af421b00106e9d7c6ba6c777b535814b2c02e69
DIST openresolv-3.5.2.tar.bz2 13933 SHA256 4a4cf4ef20a1ce207937fb669bbae43f9db36f6298090b5e074c80ed2fe4a996 SHA512 502740bf3cc09f754c1383d1dac9144c701e75c8b6663808778a22be257e15e09bce80623ff7524a90320adcf2f15e4cfa613e7fc74d55039ed250a74e10d2cd WHIRLPOOL 2bce3841febd44ae891f21eb31d140843cf2dc251b9560c5d17ea511d16baf6c51d727a3893208786047c701f983dcf44b12f9caa5bdb25a19180b1be5208a4e
DIST openresolv-3.5.4.tar.bz2 14662 SHA256 ab91fce9053ac653379155aaa6f1b912c0e117d8c55c91a908133ea26004c446 SHA512 9933ee8cd3f9a54fa76871a72b9a6a234cff9d97d56f753063b26283af91cee34298b43fd412c233e7968e3affa275ad22ffd1040230ea343bd6a004ff430a3b WHIRLPOOL b3ce0caf028a7112ab6e70c50b3799848547048b35c7f11847fe21817caa0b3c1b9d5c780bd4a27fa2e67ffc66ddab2eac597dffa80b3841b68cb41de0da9b07
+DIST openresolv-3.5.6.tar.bz2 14746 SHA256 db4671277ee137cf23bac15c5d4cbdc3e55c856d1f4e5f522bb09eba76e06cd8 SHA512 202d12224627a4f88bad114c1f48b3d9a9a0008f2bd672c355d2f80db44c4d07b12fe2b757715d7f88fdfb7c39d05a20782d3fa80df695f03a251af823705bb1 WHIRLPOOL e1013a1fbe78bc2f6f51b375c78cc0d7d24c1f6ee18af2f8bd1419d67b76b54b8964285e1718cfaaa92e65f75b794ee001e52e5fb0d088bca774760302340ffa
@@ -0,0 +1,20 @@
+#!/bin/sh
+# This script currently supports:
+# - openrc
+# - systemd
+
+if [ -z "${1}" ]; then
+ echo "Missing arguments." >&2
+ exit 1
+fi
+
+if [ -e /run/openrc/softlevel ]; then
+ if /sbin/rc-service -e ${1}; then
+ exec rc-service ${1} -- -Ds restart
+ fi
+elif [ -d /run/systemd/system ]; then
+ exec systemctl try-restart ${1}
+else
+ echo "Unsupported init system." >&2
+ exit 1
+fi
@@ -0,0 +1,48 @@
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=5
+
+inherit eutils
+
+DESCRIPTION="A framework for managing DNS information"
+HOMEPAGE="http://roy.marples.name/projects/openresolv"
+SRC_URI="http://roy.marples.name/downloads/${PN}/${P}.tar.bz2"
+
+LICENSE="BSD-2"
+SLOT="0"
+KEYWORDS="*"
+IUSE=""
+
+DEPEND="!net-dns/resolvconf-gentoo
+ !<net-dns/dnsmasq-2.40-r1"
+RDEPEND=""
+
+src_configure() {
+ econf \
+ --prefix= \
+ --rundir=/var/run \
+ --libexecdir=/lib/resolvconf \
+ --restartcmd="/lib/resolvconf/helpers/restartcmd \1"
+}
+
+src_install() {
+ default
+ exeinto /lib/resolvconf/helpers
+ doexe "${FILESDIR}"/restartcmd
+}
+
+pkg_config() {
+ if [ "${ROOT}" != "/" ]; then
+ eerror "We cannot configure unless \$ROOT=/"
+ return 1
+ fi
+
+ if [ -n "$(resolvconf -l)" ]; then
+ einfo "${PN} already has DNS information"
+ else
+ ebegin "Copying /etc/resolv.conf to resolvconf -a dummy"
+ resolvconf -a dummy </etc/resolv.conf
+ eend $? || return $?
+ einfo "The dummy interface will disappear when you next reboot"
+ fi
+}

0 comments on commit 9c71f52

Please sign in to comment.