summaryrefslogtreecommitdiff
path: root/usr.sbin/sysmerge/sysmerge.sh
diff options
context:
space:
mode:
authorAntoine Jacoutot <ajacoutot@cvs.openbsd.org>2015-12-21 10:54:50 +0000
committerAntoine Jacoutot <ajacoutot@cvs.openbsd.org>2015-12-21 10:54:50 +0000
commit1d0db0019a4e006949722bfa546baa252bf847cc (patch)
tree2de47e3a267fe8828bb9625b9c992f04c67d01b1 /usr.sbin/sysmerge/sysmerge.sh
parent272e129f955dccd127298734ee73db6132737fe1 (diff)
Only run newaliases(8) if we already have an aliases db.
Diffstat (limited to 'usr.sbin/sysmerge/sysmerge.sh')
-rw-r--r--usr.sbin/sysmerge/sysmerge.sh10
1 files changed, 7 insertions, 3 deletions
diff --git a/usr.sbin/sysmerge/sysmerge.sh b/usr.sbin/sysmerge/sysmerge.sh
index f3f2c0587a1..cf5f321e7b6 100644
--- a/usr.sbin/sysmerge/sysmerge.sh
+++ b/usr.sbin/sysmerge/sysmerge.sh
@@ -1,6 +1,6 @@
#!/bin/ksh -
#
-# $OpenBSD: sysmerge.sh,v 1.217 2015/11/28 02:42:22 deraadt Exp $
+# $OpenBSD: sysmerge.sh,v 1.218 2015/12/21 10:54:49 ajacoutot Exp $
#
# Copyright (c) 2008-2014 Antoine Jacoutot <ajacoutot@openbsd.org>
# Copyright (c) 1998-2003 Douglas Barton <DougB@FreeBSD.org>
@@ -337,8 +337,12 @@ sm_install() {
fi
;;
/etc/mail/aliases)
- echo " (running newaliases(8))"
- sm_warn $(newaliases 2>&1 >/dev/null)
+ if [[ -f /etc/mail/aliases.db ]]; then
+ echo " (running newaliases(8))"
+ sm_warn $(newaliases 2>&1 >/dev/null)
+ else
+ echo
+ fi
;;
*)
echo