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 7needgroup=audio # a group chronos is in and root isn't 8neednogroup=root # we'd better not still be in root... 9 10. "$(dirname "$0")"/common.sh 11 12groups=$(groups) 13if ! echo "$groups" | grep -Eq "\b$needgroup\b"; then 14 die "$needgroup not in $groups" 15fi 16if echo "$groups" | grep -Eq "\b$neednogroup\b"; then 17 die "$neednogroup in $groups"; 18fi 19exit 0 20