From: Eric Biggers Date: Tue, 28 Feb 2017 22:09:36 +0000 (-0800) Subject: common/rc: accept "localdomain" to mean YP/NIS disabled X-Git-Tag: v2022.05.01~2147 X-Git-Url: http://git.apps.os.sepia.ceph.com/?p=xfstests-dev.git;a=commitdiff_plain;h=8cb6ef62cc42881557be524e2f4a77dbf612587d common/rc: accept "localdomain" to mean YP/NIS disabled When asked to 'cat' the passwd or group files, currently xfstests runs the 'domainname' program to get what the kernel thinks the domainname is. It seems that traditionally this has been "(none)" if YP/NIS is not in use. However, Android devices use a different convention which is to set the domainname to "localdomain". Therefore, this patch updates xfstests to accept both conventions to indicate YP/NIS disabled. This stops a number of tests from failing when run on Android. Signed-off-by: Eric Biggers Reviewed-by: Eryu Guan Signed-off-by: Eryu Guan --- diff --git a/common/rc b/common/rc index 8f233346..aa78d4b2 100644 --- a/common/rc +++ b/common/rc @@ -1792,7 +1792,7 @@ _yp_active() { local dn dn=$(domainname 2>/dev/null) - test -n "${dn}" -a "${dn}" != "(none)" + test -n "${dn}" -a "${dn}" != "(none)" -a "${dn}" != "localdomain" echo $? }