|
DataMuseum.dkPresents historical artifacts from the history of: Regnecentalen RC-900 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about Regnecentalen RC-900 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 1873 (0x751) Types: TextFile Notes: UNIX file Names: »del_lanmux«
└─⟦104d96909⟧ Bits:30004765 SW95718I UNIX LAN Server Rel. 1.1 └─⟦104d96909⟧ UNIX Filesystem └─⟦this⟧ »LS/new/usr/admin/menu/packagemgmt/lanmuxmgmt/del_lanmux«
#ident "@(#)del_lanmux 1.1, RC International, 90/10/03" #menu# disable a LANMUX from access to this load server #help# #help# This procedure allows you to disable a LANMUX to load from this #help# server. The deleted LANMUX's files are removed from the file #help# systems 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 LANMUX, 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\}:.*:.*:.*:.*:.*:.*/nologin$;s/:.*//p' /etc/passwd` if [ -z "${lmxs}" ] then echo "There are no${MORE} LANMUX's loading from this server" exit 0 fi echo "This is a list of available LANMUX:\n" echo "${lmxs}" | pr -o4 -t -5 echo loginid=`checklist ${flags} -fetp -H' Deleting a LANMUX removes the download and configuration files for a LANMUX' "Which LANMUX 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 LANMUX UNIT '${loginid}'?" then passmgmt -d ${loginid} > /dev/null 2>&1 if [ $? -ne 0 ] then ed - /etc/passwd <<-! H /^${loginid}:/d w q ! fi if [ $? -ne 0 ] then admerr $0 'Failure attempting to delete LANMUX 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