DataMuseum.dk

Presents historical artifacts from the history of:

RC9000

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about RC9000

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - download
Index: @ T u

⟦7ceffd82b⟧ TextFile

    Length: 1032 (0x408)
    Types: TextFile
    Notes: @(#)uniq_gnam.sh 13.1 (RC International) 91/07/25
    Names: »uniq_gnam«

Derivation

└─⟦50656ff4a⟧ Bits:30010538 TX 3.1 Coldstart
    └─⟦bbf173f5c⟧ »0004« 
        └─⟦this⟧ »./usr/sadm/sysadm/bin/uniq_gnam« 

TextFile

#	@(#)uniq_gnam.sh	13.1 (RC International) 91/07/25

#	Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T
#	  All Rights Reserved

#	THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF AT&T
#	The copyright notice above does not evidence any
#	actual or intended publication of such source code.

#!/sbin/sh
#ident	"@(#)oamintf:usermgmt/uniq_gnam.sh	1.3"

################################################################################
#	Command Name: uniq_gnam
#
# 	This functions is used for checking if group name is unique.
#	 
#	Grep for the name passed in /etc/group, it must be at the
#	beginning of the line.  If the name is found return a 1
#	(false - since the name is already taken), return a 0 if
#	the name is not found (true - the name chosen is unique).
#
#	$1 - User input
#	$2 - Field default (only in groupmod)
################################################################################

test -z "$1" && exit 1

test "$1" = "$2" && exit 0

if grep "^$1:" /etc/group> /dev/null 2>&1
then
	exit 1
else
	exit 0
fi