#!./perl
-if (! -x ($groups = '/usr/ucb/groups') &&
- ! -x ($groups = '/usr/bin/groups') &&
- ! -x ($groups = '/bin/groups')
+if (! -x ($groups = '/usr/ucb/groups') &&
+ ! -x ($groups = '/usr/bin/groups') &&
+ ! -x ($groups = '/bin/groups') &&
+ ! -x ($groups = '/usr/bin/id') &&
+ ! -x ($groups = '/bin/id') &&
+ ! -x ($groups = '/usr/xpg4/bin/id')
) {
print "1..0\n";
exit 0;
$gr1 = join(' ', sort @gr);
}
+$groups .= ' -Gn' if $groups =~ m:/id$:;
+
$gr2 = join(' ', grep(!$basegroup{$_}++, sort split(' ',`$groups`)));
if ($gr1 eq $gr2) {