At the 2018 spring NFS BAT, we have a number of systems that return
a valid string from `domainaname`, but don't have the ypcat binary.
If we don't have the yp-tools package installed, we're not going to
be able to use ypcat, so check for it and bail out.
Signed-off-by: Benjamin Coddington <bcodding@redhat.com>
Reviewed-by: Eryu Guan <guaneryu@gmail.com>
Signed-off-by: Eryu Guan <guaneryu@gmail.com>
{
local dn
dn=$(domainname 2>/dev/null)
{
local dn
dn=$(domainname 2>/dev/null)
- test -n "${dn}" -a "${dn}" != "(none)" -a "${dn}" != "localdomain"
+ local ypcat=$(type -P ypcat)
+ test -n "${dn}" -a "${dn}" != "(none)" -a "${dn}" != "localdomain" -a -n "${ypcat}"