Mercurial > pkg
view previous-work/more_control_helpers/lib/chgrp @ 17:cb1a44d080db
consolidating init scripts.
author | Robert McIntyre <rlm@mit.edu> |
---|---|
date | Wed, 09 Jan 2013 11:41:55 +0000 |
parents | d6bef198ae71 |
children |
line wrap: on
line source
1 #!/bin/bash2 # Copyright (c) 2000,2004 Matthias S. Benkmann <article AT winterdrache DOT de>3 # You may do everything with this code except misrepresent its origin.4 # PROVIDED `AS IS' WITH ABSOLUTELY NO WARRANTY OF ANY KIND!6 DAISY_CHAIN=""8 for p in $(type -ap chgrp) ; do9 if [ ! $p -ef $0 ]; then DAISY_CHAIN=$p ; break ; fi10 done12 if [ ! -n "$DAISY_CHAIN" ]; then13 echo Cannot find real ${0##*/} command14 exit 115 fi17 if [ $UID == 0 ]; then18 exec $DAISY_CHAIN "$@"19 fi21 if [ "$1" == "tty" ]; then22 echo 1>&2 '***' chgrp "$@"23 else24 $DAISY_CHAIN "$@" || exit $?25 fi27 exit 0