summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Egesdahl <ryan.egesdahl@mongodb.com>2021-02-15 18:06:27 -0800
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-05-06 23:58:47 +0000
commit77a4e1350031ce0c22e8ffb59060e13710969aad (patch)
treeae507af3f6c78fafa4aaab11e8182faa43c98621
parentbfcd6b8aa168f787c0244a06546b188ef7499e11 (diff)
downloadmongo-77a4e1350031ce0c22e8ffb59060e13710969aad.tar.gz
SERVER-54386 Prevent install errors when systemd is not running
(cherry picked from commit 8cf3de4ca76037e9bdace59d84f8ee7403f8a03b) (cherry picked from commit 77f008215f8b56805c84a0e70834afa9d6b628e8) (cherry picked from commit 035483ab3e7c5d6a7cdc28f08e4c8531f0b36b63)
-rw-r--r--debian/mongodb-enterprise-server.postinst5
-rw-r--r--debian/mongodb-enterprise-unstable-server.postinst5
-rw-r--r--debian/mongodb-org-server.postinst5
-rw-r--r--debian/mongodb-org-unstable-server.postinst5
4 files changed, 12 insertions, 8 deletions
diff --git a/debian/mongodb-enterprise-server.postinst b/debian/mongodb-enterprise-server.postinst
index a09e41f8edf..9a5fdff903b 100644
--- a/debian/mongodb-enterprise-server.postinst
+++ b/debian/mongodb-enterprise-server.postinst
@@ -39,9 +39,10 @@ case "$1" in
chown mongodb:mongodb /var/log/mongodb
fi
- # Check for changes to the service file
+ # Check for changes to the service file, but ignore errors when
+ # systemd is not running.
if $(command systemctl --help >/dev/null); then
- systemctl daemon-reload
+ systemctl daemon-reload || true
fi
;;
diff --git a/debian/mongodb-enterprise-unstable-server.postinst b/debian/mongodb-enterprise-unstable-server.postinst
index a09e41f8edf..9a5fdff903b 100644
--- a/debian/mongodb-enterprise-unstable-server.postinst
+++ b/debian/mongodb-enterprise-unstable-server.postinst
@@ -39,9 +39,10 @@ case "$1" in
chown mongodb:mongodb /var/log/mongodb
fi
- # Check for changes to the service file
+ # Check for changes to the service file, but ignore errors when
+ # systemd is not running.
if $(command systemctl --help >/dev/null); then
- systemctl daemon-reload
+ systemctl daemon-reload || true
fi
;;
diff --git a/debian/mongodb-org-server.postinst b/debian/mongodb-org-server.postinst
index a09e41f8edf..9a5fdff903b 100644
--- a/debian/mongodb-org-server.postinst
+++ b/debian/mongodb-org-server.postinst
@@ -39,9 +39,10 @@ case "$1" in
chown mongodb:mongodb /var/log/mongodb
fi
- # Check for changes to the service file
+ # Check for changes to the service file, but ignore errors when
+ # systemd is not running.
if $(command systemctl --help >/dev/null); then
- systemctl daemon-reload
+ systemctl daemon-reload || true
fi
;;
diff --git a/debian/mongodb-org-unstable-server.postinst b/debian/mongodb-org-unstable-server.postinst
index a09e41f8edf..9a5fdff903b 100644
--- a/debian/mongodb-org-unstable-server.postinst
+++ b/debian/mongodb-org-unstable-server.postinst
@@ -39,9 +39,10 @@ case "$1" in
chown mongodb:mongodb /var/log/mongodb
fi
- # Check for changes to the service file
+ # Check for changes to the service file, but ignore errors when
+ # systemd is not running.
if $(command systemctl --help >/dev/null); then
- systemctl daemon-reload
+ systemctl daemon-reload || true
fi
;;