Module Name: src
Committed By: tsutsui
Date: Sun Jan 12 03:56:14 UTC 2020
Modified Files:
src/distrib/miniroot: install.sub
Log Message:
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.
To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/distrib/miniroot/install.sub
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/distrib/miniroot/install.sub
diff -u src/distrib/miniroot/install.sub:1.50 src/distrib/miniroot/install.sub:1.51
--- src/distrib/miniroot/install.sub:1.50 Sun Jan 12 03:37:10 2020
+++ src/distrib/miniroot/install.sub Sun Jan 12 03:56:14 2020
@@ -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 @@ unmount_fs()
_fstab=$1
fi
- if [ ! \( -f $_fstab -a -s $_fstab \) ]; then
+ if ! [ -f "${_fstab}" ] || ! [ -s "${_fstab}" ]; then
echo "fstab empty" > /dev/tty
return
fi