From 1d0db0019a4e006949722bfa546baa252bf847cc Mon Sep 17 00:00:00 2001 From: Antoine Jacoutot Date: Mon, 21 Dec 2015 10:54:50 +0000 Subject: Only run newaliases(8) if we already have an aliases db. --- usr.sbin/sysmerge/sysmerge.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'usr.sbin/sysmerge/sysmerge.sh') 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 # Copyright (c) 1998-2003 Douglas Barton @@ -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 -- cgit v1.2.3