aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--buildtools/freebsd-skeleton/rpki-ca/pkg-deinstall9
-rw-r--r--rpkid/Makefile.in22
2 files changed, 23 insertions, 8 deletions
diff --git a/buildtools/freebsd-skeleton/rpki-ca/pkg-deinstall b/buildtools/freebsd-skeleton/rpki-ca/pkg-deinstall
index fb184390..0e63b94c 100644
--- a/buildtools/freebsd-skeleton/rpki-ca/pkg-deinstall
+++ b/buildtools/freebsd-skeleton/rpki-ca/pkg-deinstall
@@ -37,11 +37,14 @@ DEINSTALL)
/usr/local/libexec/rpkigui-apache-conf-gen --freebsd --remove --verbose
- # Clean up configuration file.
+ # This is where we'd remove rpki.conf if it were identical to
+ # rpki.conf.sample and if we didn't have to worry about things
+ # like SQL passwords. As it is, we always leave rpki.conf for the
+ # user to delete.
- if /usr/bin/cmp -s /usr/local/etc/rpki.conf.sample /usr/local/etc/rpki.conf
+ if test -f /usr/local/etc/rpki.conf
then
- /bin/rm -f /usr/local/etc/rpki.conf
+ echo "Please remove /usr/local/etc/rpki.conf manually if you're really deinstalling."
fi
/bin/rm -f /usr/local/etc/rpki.conf.sample
diff --git a/rpkid/Makefile.in b/rpkid/Makefile.in
index dcc54392..ad412e4e 100644
--- a/rpkid/Makefile.in
+++ b/rpkid/Makefile.in
@@ -220,13 +220,25 @@ install-postconf: \
install-user:
@true
-install-conf: ${DESTDIR}${sysconfdir}/rpki.conf
-
-${DESTDIR}${sysconfdir}/rpki.conf: ${DESTDIR}${sysconfdir}/rpki.conf.sample
- cp -p ${DESTDIR}${sysconfdir}/rpki.conf.sample $@
+# We used to play the FreeBSD game of copying rpki.conf.sample to
+# rpki.conf on install and removing rpki.conf if it's identical to
+# rpki.conf.sample in uninstall, but that turns out to work poorly
+# with generated passwords. So now we copy rpki.conf.sample if and
+# only if rpki.conf does not exist, and we leave removal of rpki.conf
+# for the user to deal with. This in turn leaves us with a different
+# problem of how to upgrade rpki.conf, but at least in the FreeBSD
+# universe we're supposed to leave that problem for the user.
+
+install-conf:
+ if test -f ${DESTDIR}${sysconfdir}/rpki.conf; \
+ then \
+ true; \
+ else \
+ cp -p ${DESTDIR}${sysconfdir}/rpki.conf.sample ${DESTDIR}${sysconfdir}/rpki.conf; \
+ fi
uninstall deinstall::
- if cmp -s ${DESTDIR}${sysconfdir}/rpki.conf ${DESTDIR}${sysconfdir}/rpki.conf.sample; then rm -f ${DESTDIR}${sysconfdir}/rpki.conf; else true; fi
+# if cmp -s ${DESTDIR}${sysconfdir}/rpki.conf ${DESTDIR}${sysconfdir}/rpki.conf.sample; then rm -f ${DESTDIR}${sysconfdir}/rpki.conf; else true; fi
rm -f ${DESTDIR}${sysconfdir}/rpki.conf.sample
install-apache: