Source-Changes-HG archive

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

[src/trunk]: src/usr.sbin/postinstall postinstall: ensure contents_owner fix ...



details:   https://anonhg.NetBSD.org/src/rev/d8150c2442f3
branches:  trunk
changeset: 931012:d8150c2442f3
user:      roy <roy%NetBSD.org@localhost>
date:      Sun Apr 19 22:10:24 2020 +0000

description:
postinstall: ensure contents_owner fix fails on find errors

The issue is that find won't pass anything to xargs and that returns 0.
So replace the usage of xargs with -exec.

diffstat:

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

diffs (22 lines):

diff -r cf8b4740dd73 -r d8150c2442f3 usr.sbin/postinstall/postinstall.in
--- a/usr.sbin/postinstall/postinstall.in       Sun Apr 19 21:55:37 2020 +0000
+++ b/usr.sbin/postinstall/postinstall.in       Sun Apr 19 22:10:24 2020 +0000
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: postinstall.in,v 1.19 2020/04/09 15:24:31 roy Exp $
+# $NetBSD: postinstall.in,v 1.20 2020/04/19 22:10:24 roy Exp $
 #
 # Copyright (c) 2002-2015 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -750,8 +750,8 @@
                fi
        elif [ "${_op}" = "fix" ]; then
                find "${_dir}" \( \( ! -user "${_user}" \) -o \
-               \( ! -group "${_grp}" \) \) -a -print0 \
-               | xargs -0 chown "${_user}:${_grp}"
+               \( ! -group "${_grp}" \) \) \
+               -exec chown "${_user}:${_grp}" -- {} \;
        fi
 }
 



Home | Main Index | Thread Index | Old Index