Source-Changes-HG archive

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

[src/trunk]: src/distrib/miniroot Fix "[: SMALL test, no fallback usage" erro...



details:   https://anonhg.NetBSD.org/src/rev/0b8f4abbdef3
branches:  trunk
changeset: 467050:0b8f4abbdef3
user:      tsutsui <tsutsui%NetBSD.org@localhost>
date:      Sun Jan 12 03:56:14 2020 +0000

description:
Fix "[: SMALL test, no fallback usage" error on miniroot installation.

Avoid and replace use of '-a', '(' and ')' operatos marked obsolescent
by modern POSIX.1-2017:
 https://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html#tag_20_128_16
as suggested by kre@ in PR/54835.

Should be pulled up to netbsd-9.

diffstat:

 distrib/miniroot/install.sub |  4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diffs (19 lines):

diff -r bac6f4c4a57b -r 0b8f4abbdef3 distrib/miniroot/install.sub
--- a/distrib/miniroot/install.sub      Sun Jan 12 03:50:30 2020 +0000
+++ b/distrib/miniroot/install.sub      Sun Jan 12 03:56:14 2020 +0000
@@ -1,5 +1,5 @@
 #!/bin/sh
-#      $NetBSD: install.sub,v 1.50 2020/01/12 03:37:10 tsutsui Exp $
+#      $NetBSD: install.sub,v 1.51 2020/01/12 03:56:14 tsutsui Exp $
 #
 # Copyright (c) 1996 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -1531,7 +1531,7 @@
                _fstab=$1
        fi
 
-       if [ ! \( -f $_fstab -a -s $_fstab \) ]; then
+       if ! [ -f "${_fstab}" ] || ! [ -s "${_fstab}" ]; then
                echo "fstab empty" > /dev/tty
                return
        fi



Home | Main Index | Thread Index | Old Index