aboutsummaryrefslogtreecommitdiff
path: root/buildtools
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2014-10-11 19:44:12 +0000
committerRob Austein <sra@hactrn.net>2014-10-11 19:44:12 +0000
commit73abb473442dd47dcd7b8627a13429e85c26d1e5 (patch)
treeb909526ef1d0918f5e4088de6f0cafba2a3e3a0a /buildtools
parentbe075cd718e9780e02fc37fae2c56f3f99bcaa50 (diff)
Pull from trunk.
svn path=/branches/tk705/; revision=5998
Diffstat (limited to 'buildtools')
-rw-r--r--buildtools/debian-skeleton/rpki-ca.postinst2
-rw-r--r--buildtools/debian-skeleton/rpki-ca.prerm35
2 files changed, 20 insertions, 17 deletions
diff --git a/buildtools/debian-skeleton/rpki-ca.postinst b/buildtools/debian-skeleton/rpki-ca.postinst
index dd01d3f8..c94e052c 100644
--- a/buildtools/debian-skeleton/rpki-ca.postinst
+++ b/buildtools/debian-skeleton/rpki-ca.postinst
@@ -20,7 +20,7 @@ setup_rpkid_group() {
}
setup_apache() {
- /usr/lib/rpki/rpkigui-apache-conf-gen --debian --install --verbose
+ /usr/lib/rpki/rpkigui-apache-conf-gen --install --verbose
}
setup_rpki_conf() {
diff --git a/buildtools/debian-skeleton/rpki-ca.prerm b/buildtools/debian-skeleton/rpki-ca.prerm
index b6033cf2..8b4d3945 100644
--- a/buildtools/debian-skeleton/rpki-ca.prerm
+++ b/buildtools/debian-skeleton/rpki-ca.prerm
@@ -49,24 +49,27 @@ case "$1" in
# retain code needed to clean up nasty mess we created in the
# past, to avoid breaking old installations on upgrade.
- # Remove the old stuff first.
+ # Remove the old stuff first, if the containing file even exists.
f=/etc/apache2/sites-available/default-ssl
- awk < $f > ${f}.tmp '
- BEGIN {
- conf_file = "/etc/rpki/apache.conf";
- conf_regexp = "^[ \t]*Include[ \t]+" conf_file "[ \t]*$";
- }
- $0 !~ conf_regexp {
- print;
- }'
-
- if cmp -s ${f}.tmp ${f}.orig
+ if test -r $f
then
- mv -f ${f}.orig $f
- rm -f ${f}.tmp
- else
- mv -f ${f}.tmp $f
+ awk < $f > ${f}.tmp '
+ BEGIN {
+ conf_file = "/etc/rpki/apache.conf";
+ conf_regexp = "^[ \t]*Include[ \t]+" conf_file "[ \t]*$";
+ }
+ $0 !~ conf_regexp {
+ print;
+ }'
+
+ if cmp -s ${f}.tmp ${f}.orig
+ then
+ mv -f ${f}.orig $f
+ rm -f ${f}.tmp
+ else
+ mv -f ${f}.tmp $f
+ fi
fi
# At this point we've cleaned up our Apache config mess.
@@ -75,7 +78,7 @@ case "$1" in
# Now remove the new stuff.
- /usr/lib/rpki/rpkigui-apache-conf-gen --debian --remove --verbose
+ /usr/lib/rpki/rpkigui-apache-conf-gen --remove --verbose
;;