summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2020-01-03 17:51:28 +0100
committerMichał Górny <mgorny@gentoo.org>2020-01-03 21:39:46 +0100
commit3dd9591c26a2d8d03b2e1bd8c56e1958eb3fba19 (patch)
tree03fc9d8ec4b9d9e8cc0d52bba7b77bcf7225d54b /net-dns/resolvconf-symlink
parentnet-dns/resolvconf-symlink: Remove useless HOMEPAGE (diff)
downloadgentoo-3dd9591c26a2d8d03b2e1bd8c56e1958eb3fba19.tar.gz
gentoo-3dd9591c26a2d8d03b2e1bd8c56e1958eb3fba19.tar.bz2
gentoo-3dd9591c26a2d8d03b2e1bd8c56e1958eb3fba19.zip
net-dns/resolvconf-symlink: Bump to EAPI=7
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'net-dns/resolvconf-symlink')
-rw-r--r--net-dns/resolvconf-symlink/resolvconf-symlink-0.ebuild24
1 files changed, 12 insertions, 12 deletions
diff --git a/net-dns/resolvconf-symlink/resolvconf-symlink-0.ebuild b/net-dns/resolvconf-symlink/resolvconf-symlink-0.ebuild
index f7ad0c456264..dbf2b430fba0 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-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://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
@@ -44,9 +43,10 @@ src_install() {
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
}