aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Runge <dave@sleepmap.de>2017-02-25 02:24:03 +0100
committerDavid Runge <dave@sleepmap.de>2017-02-25 02:24:03 +0100
commit7f4c46da3aeba3290e700835b54fbe80c6ad94ce (patch)
treeb7cc3cb7f9e8907879e9914e86007f4a70dd0d8a
parentaa6c19665c133d61b9f99fac74e63d84712aa928 (diff)
downloaduenv-3a3617f0bbdd3162f968534452dd8e9fe6ebb8e6.tar.gz
uenv-3a3617f0bbdd3162f968534452dd8e9fe6ebb8e6.tar.bz2
uenv-3a3617f0bbdd3162f968534452dd8e9fe6ebb8e6.tar.xz
uenv-3a3617f0bbdd3162f968534452dd8e9fe6ebb8e6.zip
bin/update-motd: Fix non-zero exit code in bashs safe mode.0.8.7
-rwxr-xr-xbin/update-motd4
1 files changed, 4 insertions, 0 deletions
diff --git a/bin/update-motd b/bin/update-motd
index 8fe4c81..658f859 100755
--- a/bin/update-motd
+++ b/bin/update-motd
@@ -23,8 +23,11 @@ uname -a >> /tmp/motd
echo >> /tmp/motd
# update package cache
+set +eu
pacman -Sy 2>&1 > /dev/null
pacman -Qu > /tmp/updates
+set -eu
+
# show updatable packages
if [ -s /tmp/updates ]; then
echo "Package updates available:" >> /tmp/motd
@@ -49,3 +52,4 @@ else
cat /tmp/motd > /etc/motd
fi
+exit 0