From: Jarkko Hietaniemi Date: Tue, 27 Oct 1998 08:34:40 +0000 (+0000) Subject: `id -Gn` might be available where `groups` is not. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=606932feba6a7c07d368ce4e766975b0fe622bfc;p=p5sagit%2Fp5-mst-13.2.git `id -Gn` might be available where `groups` is not. p4raw-id: //depot/cfgperl@2098 --- diff --git a/t/op/groups.t b/t/op/groups.t index f6f5ba2..97a4105 100755 --- a/t/op/groups.t +++ b/t/op/groups.t @@ -1,8 +1,11 @@ #!./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; @@ -33,6 +36,8 @@ if ($^O eq "uwin") { $gr1 = join(' ', sort @gr); } +$groups .= ' -Gn' if $groups =~ m:/id$:; + $gr2 = join(' ', grep(!$basegroup{$_}++, sort split(' ',`$groups`))); if ($gr1 eq $gr2) {