Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/postinstall exclude_libs - redirect ls 2> /dev/null...



details:   https://anonhg.NetBSD.org/src/rev/03782252f066
branches:  trunk
changeset: 965320:03782252f066
user:      uwe <uwe%NetBSD.org@localhost>
date:      Thu Sep 12 21:56:55 2019 +0000

description:
exclude_libs - redirect ls 2> /dev/null so that the user is not
spammed with errors for directories without any libraries; the most
common case in the wild would be empty /usr/libdata/debug.  Add -d to
ls for good measure while here.

diffstat:

 usr.sbin/postinstall/postinstall.in |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (20 lines):

diff -r 604b87a6b648 -r 03782252f066 usr.sbin/postinstall/postinstall.in
--- a/usr.sbin/postinstall/postinstall.in       Thu Sep 12 21:37:06 2019 +0000
+++ b/usr.sbin/postinstall/postinstall.in       Thu Sep 12 21:56:55 2019 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: postinstall.in,v 1.5 2019/06/15 13:07:09 christos Exp $
+# $NetBSD: postinstall.in,v 1.6 2019/09/12 21:56:55 uwe Exp $
 #
 # Copyright (c) 2002-2015 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -591,7 +591,7 @@
 # from consideration for removal
 #
 exclude_libs() {
-       local target="$(ls -l lib*.so.* \
+       local target="$(ls -l -d lib*.so.* 2> /dev/null \
            | ${AWK} '{ print $11; }' \
            | ${SED} -e 's@.*/@@' | ${SORT} -u)"
        exclude -t ${target}



Home | Main Index | Thread Index | Old Index