From 7f4c46da3aeba3290e700835b54fbe80c6ad94ce Mon Sep 17 00:00:00 2001 From: David Runge Date: Sat, 25 Feb 2017 02:24:03 +0100 Subject: bin/update-motd: Fix non-zero exit code in bashs safe mode. --- bin/update-motd | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'bin') 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 -- cgit v1.2.3-70-g09d2