xfstests: fix NIS detection damage
[xfstests-dev.git] / common.rc
index e0cdfe6537d4c045430dd3c12178d436a7b40299..08d4f714702afb16c3fa23ce7136eef9a5377d95 100644 (file)
--- a/common.rc
+++ b/common.rc
@@ -800,13 +800,14 @@ _yp_active()
        local dn
        dn=$(domainname 2>/dev/null)
        test -n "${dn}" -a "${dn}" != "(none)"
+       echo $?
 }
 
 # cat the password file
 #
 _cat_passwd()
 {
-       [ _yp_active ] && ypcat passwd
+       [ $(_yp_active) -eq 0 ] && ypcat passwd
        cat /etc/passwd
 }
 
@@ -814,10 +815,9 @@ _cat_passwd()
 #
 _cat_group()
 {
-       [ _yp_active ] && ypcat group
+       [ $(_yp_active) -eq 0 ] && ypcat group
        cat /etc/group
 }
-export -f _yp_active _cat_passwd _cat_group
 
 # check for the fsgqa user on the machine
 #