]>
git.cameronkatri.com Git - pw-darwin.git/blob - adduser/rmgroup.sh
2 # Copyright (c) 1996 Wolfram Schneider <wosch@FreeBSD.org>. Berlin.
5 # rmgroup - delete a Unix group
9 PATH
=/bin
:/usr
/bin
; export PATH
13 ""|-*) echo "usage: rmgroup group"; exit 1;;
14 wheel
|daemon
|kmem
|sys
|tty
|operator
|bin
|nogroup
|nobody
)
15 echo "Do not remove system group: $1"; exit 2;;
19 if egrep -q -- "^$group:" $db; then
20 if egrep -q -- "^$group:\*:0:" $db; then
21 echo "Do not remove group with gid 0: $group"
24 egrep -v -- "^$group:" $db > $db.new
&&
28 echo "Group \"$group\" does not exists in $db."; exit 1