Prefer more portable test(1) constructs

* util/grub.d/00_header.in (make_timeout): Use && rather than test
-a.
* util/grub.d/10_windows.in: Likewise.
* util/grub.d/10_netbsd.in (netbsd_load_fs_module): Use || rather
than test -o.
* util/grub.d/30_os-prober.in: Use && rather than test -a, and ||
rather than test -o.
This commit is contained in:
Colin Watson 2014-01-17 15:24:50 +00:00
parent 09a836e59c
commit ff66b8e7d8
5 changed files with 17 additions and 7 deletions

View file

@ -66,11 +66,11 @@ for drv in $drives ; do
osid=
# Check for Vista bootmgr.
if [ -f "$dir"/bootmgr -a -f "$dir"/boot/bcd ] ; then
if [ -f "$dir"/bootmgr ] && [ -f "$dir"/boot/bcd ] ; then
OS="$(gettext "Windows Vista/7 (loader)")"
osid=bootmgr
# Check for NTLDR.
elif [ -f "$dir"/ntldr -a -f "$dir"/ntdetect.com -a -f "$dir"/boot.ini ] ; then
elif [ -f "$dir"/ntldr ] && [ -f "$dir"/ntdetect.com ] && [ -f "$dir"/boot.ini ] ; then
OS=`get_os_name_from_boot_ini "$dir"/boot.ini` || OS="$(gettext "Windows NT/2000/XP (loader)")"
osid=ntldr
needmap=t