diff options
author | Conrad Kostecki <conikost@gentoo.org> | 2022-10-10 23:58:02 +0200 |
---|---|---|
committer | Conrad Kostecki <conikost@gentoo.org> | 2022-10-11 00:00:52 +0200 |
commit | 50ff065438d63596d5651ac0b5c36adbdc9b5d1b (patch) | |
tree | e3e71a1b2c81fa57006cbdf3b2e8c1edeeee9353 /net-dns/ddclient | |
parent | dev-libs/liborcus: Update subslot (diff) | |
download | gentoo-50ff065438d63596d5651ac0b5c36adbdc9b5d1b.tar.gz gentoo-50ff065438d63596d5651ac0b5c36adbdc9b5d1b.tar.bz2 gentoo-50ff065438d63596d5651ac0b5c36adbdc9b5d1b.zip |
net-dns/ddclient: add exist check for config
Check, if old config exists before migrating it.
Closes: https://bugs.gentoo.org/876628
Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
Diffstat (limited to 'net-dns/ddclient')
-rw-r--r-- | net-dns/ddclient/ddclient-3.10.0_rc2.ebuild | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/net-dns/ddclient/ddclient-3.10.0_rc2.ebuild b/net-dns/ddclient/ddclient-3.10.0_rc2.ebuild index 62aa3c885802..f4d5478a2573 100644 --- a/net-dns/ddclient/ddclient-3.10.0_rc2.ebuild +++ b/net-dns/ddclient/ddclient-3.10.0_rc2.ebuild @@ -66,12 +66,12 @@ pkg_postinst() { if [[ ${REPLACING_VERSIONS} ]]; then for v in ${REPLACING_VERSIONS}; do if ver_test "${v}" -lt 3.10.0; then - cp /etc/ddclient/ddclient.conf /etc/ddclient.conf || die - - ewarn "Your DDClient configuration has been copied from" - ewarn "'/etc/ddclient/ddclient.conf' to '/etc/ddclient.conf'." - ewarn "Please check your configuration." - + if [ -f "${EROOT}/etc/ddclient/ddclient.conf" ]; then + cp /etc/ddclient/ddclient.conf /etc/ddclient.conf || die + ewarn "Your DDClient configuration has been copied from" + ewarn "'/etc/ddclient/ddclient.conf' to '/etc/ddclient.conf'." + ewarn "Please check your configuration." + fi break fi done |