summaryrefslogtreecommitdiff
path: root/net-dns/resolvconf-symlink
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-01-15 15:51:32 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-01-15 15:51:32 +0000
commit21435953e16cda318a82334ddbadb3b5c36d9ea7 (patch)
treee1810a4b135afce04b34862ef0fab2bfaeb8aeca /net-dns/resolvconf-symlink
parent7bc9c63c9da678a7e6fceb095d56c634afd22c56 (diff)
gentoo resync : 15.01.2020
Diffstat (limited to 'net-dns/resolvconf-symlink')
-rw-r--r--net-dns/resolvconf-symlink/Manifest2
-rw-r--r--net-dns/resolvconf-symlink/resolvconf-symlink-0.ebuild30
2 files changed, 16 insertions, 16 deletions
diff --git a/net-dns/resolvconf-symlink/Manifest b/net-dns/resolvconf-symlink/Manifest
index 6328493bdfd9..e5db6f5d4a4e 100644
--- a/net-dns/resolvconf-symlink/Manifest
+++ b/net-dns/resolvconf-symlink/Manifest
@@ -1,2 +1,2 @@
-EBUILD resolvconf-symlink-0.ebuild 1496 BLAKE2B 3afb110a759f304c84a865b97340618bf32b2eb777fac702f90a625685417423a52c4098ecf3278a111a11f926ac974f8c628e883d0e8b96dd91a6392112141d SHA512 8099ea0189da0e4614445d406c569e70ee1f88227803a5fcf42b6365a75224ac550f0af2a140c2d70db1f0bb2c49c0f85f6eb25314b161307829f99e552be889
+EBUILD resolvconf-symlink-0.ebuild 1534 BLAKE2B c32f7f626f31743f25e0280e7b4eced5f374fc88d4344cd70823fc100f88b55e33dd8522b4a7792abf401beaa857e5c9eaa368ef1f01c3a456f45159472fdf4f SHA512 dd19baa7de4f29951b6639b0bca293eddb70150281d9829413c71f090734a94702939fba7bc6f27e5497ef98ff4e5e89f497f038cc20314a4a88f69e63592c09
MISC metadata.xml 387 BLAKE2B 3a03e49bfd34ba84173daa8e0449b1fc8fbba941c14be257ee444d0fe20dbb2a1ebe5ed4671467c1f827549733ea20ac12ba8aef2d588360632339114ec4f094 SHA512 34bb7374a90375f557a9791c7b7cfb78260965a148e6c73ef829bbd2dbc34931b7677408e519e7cdb06445c0ac3ea180b59e73770614e6215eddf15fcdbaf064
diff --git a/net-dns/resolvconf-symlink/resolvconf-symlink-0.ebuild b/net-dns/resolvconf-symlink/resolvconf-symlink-0.ebuild
index d11ff4ab6257..782762cc845f 100644
--- a/net-dns/resolvconf-symlink/resolvconf-symlink-0.ebuild
+++ b/net-dns/resolvconf-symlink/resolvconf-symlink-0.ebuild
@@ -1,35 +1,34 @@
-# Copyright 1999-2012 Gentoo Foundation
+# Copyright 1999-2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
-EAPI=4
+EAPI=7
DESCRIPTION="Make /etc/resolv.conf a symlink to a runtime-writable location"
-HOMEPAGE="https://www.gentoo.org"
+HOMEPAGE="https://wiki.gentoo.org/wiki/No_homepage"
SRC_URI=""
+S=${WORKDIR}
LICENSE="public-domain"
SLOT="0"
KEYWORDS="~amd64 ~x86"
IUSE="+symlink"
-S=${WORKDIR}
-
pkg_preinst() {
if use symlink; then
- if [[ -f "${ROOT}"etc/resolv.conf && ! -L "${ROOT}"etc/resolv.conf ]]
+ if [[ -f ${EROOT}/etc/resolv.conf && ! -L ${EROOT}/etc/resolv.conf ]]
then # migrate existing resolv.conf
- if [[ "$(head -n 1 "${ROOT}"etc/resolv.conf)" \
+ if [[ "$(head -n 1 "${EROOT}"/etc/resolv.conf)" \
!= "# Generated by "* ]]; then
- eerror "${ROOT}etc/resolv.conf seems not to be autogenerated."
+ eerror "${EROOT}/etc/resolv.conf seems not to be autogenerated."
eerror "Aborting build to avoid removing user data. If that file is supposed"
eerror "to be autogenerated, please remove it manually. Otherwise, please"
eerror "set USE=-symlink to avoid installing resolv.conf symlink."
- die "${ROOT}etc/resolv.conf not autogenerated"
+ die "${EROOT}/etc/resolv.conf not autogenerated"
else
- ebegin "Moving ${ROOT}etc/resolv.conf to ${ROOT}var/run/"
- mv "${ROOT}"etc/resolv.conf "${ROOT}"var/run/
+ ebegin "Moving ${EROOT}/etc/resolv.conf to ${EROOT}/var/run/"
+ mv "${EROOT}"/etc/resolv.conf "${EROOT}"/var/run/
eend ${?} || die
fi
fi
@@ -39,14 +38,15 @@ pkg_preinst() {
src_install() {
# XXX: /run should be more correct, when it's supported by baselayout
- use symlink && dosym /var/run/resolv.conf /etc/resolv.conf
+ use symlink && dosym ../var/run/resolv.conf /etc/resolv.conf
}
pkg_postrm() {
# Don't leave the user with no resolv.conf
- if [[ ! -e "${ROOT}"etc/resolv.conf && -f "${ROOT}"var/run/resolv.conf ]]; then
- ebegin "Moving ${ROOT}var/run/resolv.conf to ${ROOT}etc/"
- mv "${ROOT}"var/run/resolv.conf "${ROOT}"etc/
+ if [[ ! -e ${EROOT}/etc/resolv.conf && -f ${EROOT}/var/run/resolv.conf ]]
+ then
+ ebegin "Moving ${EROOT}/var/run/resolv.conf to ${EROOT}/etc/"
+ mv "${EROOT}"/var/run/resolv.conf "${EROOT}"/etc/
eend ${?} || die
fi
}