DataMuseum.dk

Presents historical artifacts from the history of:

Regnecentalen RC-900

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

See our Wiki for more about Regnecentalen RC-900

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦8243094a5⟧ TextFile

    Length: 1822 (0x71e)
    Types: TextFile
    Notes: UNIX file
    Names: »delrc911«

Derivation

└─⟦6c3d40b06⟧ Bits:30004150 SW95702I LANCOM 2.1
└─⟦6c3d40b06⟧ UNIX Filesystem
    └─⟦this⟧ »LM/new/usr/admin/menu/packagemgmt/RC911mgmt/delrc911« 

TextFile


#ident	"%W% %E% %U% FK"
#menu# disable an RC911 from access to this load server
#help# 
#help#	delrc911 allows you to disable an RC911 to load from this server.
#help#	The deleted RC911's files are removed from the file systems
#help#	and it's login are removed from the /etc/passwd file.

flags="-qq -k$$"
trap 'exit 0' 1 2  15

MORE=""

echo '
This function COMPLETELY REMOVES THE RC911, and its configuration.
	Once this is done, there is NO WAY to get it back.
		BE SURE THIS IS WHAT YOU WANT TO DO!
'
while :
do
	lmxs=`sed -n -e '\;^lm[0-9a-f]\{6\}:.*:.*:.*:.*:.*:/etc/nologin$;s/:.*//p' /etc/passwd`
	if [ -z "${lmxs}" ]
	then
		echo "There are no${MORE} RC911's loading from this server"
		test -f /usr/rcdialog/data/LANMUX.d && rm -f /usr/rcdialog/data/LANMUX.d
		exit 0
	fi
	echo "This is a list of available RC911:\n"
	echo "${lmxs}" | pr -o4 -t -5
	echo
	loginid=`checklist ${flags} -fetp -H'
Deleting an RC911 removes the download
and configuration files for a RC911' "Which RC911 do your wish to delete [?,q]" ${lmxs}`

	idline=`grep "^${loginid}:" /etc/passwd`
	if [ -z "${idline}" ]
	then
		admerr $0 "${loginid} not found in /etc/passwd"
		exit 1
	else
		home=`echo "${idline}" | cut -d: -f6`
		if  checkyn ${flags} -H"
If you answer  y  all files under ${home} will be removed." \
			-f "Do you want to remove RC911 UNIT '${loginid}'?"
		then
			ed - /etc/passwd <<-!
				H
				/^${loginid}:/d
				w
				q
			!
			if [ $? -ne 0 ]
			then
				admerr $0 'Failure attempting to delete RC911 password entry'
				exit 1
			fi
			if [ ! -d ${home} ]
			then
				echo "\\t${home} does not exist."
			else
				rm -rf ${home}
				echo '\n' ${home} 'and all files under it have been removed.'
			fi
			rm -f /usr/mail/${loginid}
			echo '\n' ${loginid} 'has been completely removed.'
			MORE=' more'
		fi
	fi
done