1 #!/bin/sh 2 # Copyright (c) 2011 The Chromium OS Authors. All rights reserved. 3 # Use of this source code is governed by a BSD-style license that can be 4 # found in the LICENSE file. 5 # args: -u chronos -g chronos -G 6 7 needgroup=audio # a group chronos is in and root isn't 8 neednogroup=root # we'd better not still be in root... 9 10 . "$(dirname "$0")"/common.sh 11 12 groups=$(groups) 13 if ! echo "$groups" | grep -Eq "\b$needgroup\b"; then 14 die "$needgroup not in $groups" 15 fi 16 if echo "$groups" | grep -Eq "\b$neednogroup\b"; then 17 die "$neednogroup in $groups"; 18 fi 19 exit 0 20