|
|
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 - downloadIndex: T U d
Length: 2275 (0x8e3)
Types: TextFile
Notes: UNIX file
Names: »delequiv«
└─⟦8c4f54e61⟧ Bits:30004068/disk2.imd Interactive TCP/IP v.1.2
└─⟦8c4f54e61⟧ UNIX Filesystem
└─⟦this⟧ »hb/new/usr/admin/menu/packagemgmt/tcpipmgmt/delequiv«
#ident "@(#)delequiv 3.1 - 88/06/01"
#ident "@(#)delequiv 1.1 - 87/07/28"
# This shell is used to delete equiv entries
# from /etc/hosts.equiv
PACKAGE="Extended Networking Utilities"
PATH=:/bin:/usr/bin:/usr/lbin
HOST=/etc/hosts
EQUIV=/etc/hosts.equiv
XDIR=$MENUTOP/menu/packagemgmt/tcpipmgmt
cd $XDIR
FIRST=true
flags="-qq -k$$"
trap 'exit 0' 1 2 15
if [ -f "$EQUIV" -a \( ! -w "$EQUIV" -o ! -r "$EQUIV" \) ]; then
admerr $0 "Can't write and read '$EQUIV'\nCan't do delete operation!\n"
exit
fi
if [ ! -r $EQUIV ]; then
echo "There are no entries in the '$EQUIV' file
Use equivmgmt to add entries.\n"
exit
fi
echo "
This procedure is used to delete entries in the
$PACKAGE '$EQUIV' file.
This file contains information on how this machine, '`uname`',
uses to share logins with the remote equivalent site. Any full
domain name in this site, is assumed to be a friend. This
means that an equivalent login id on the two machines is the
same person on both machines.
"
while $FIRST || chkyn -f ${flags} '
Any other deletions?' || exit
do
FIRST=false
syslist=`grep '^[^#]' $EQUIV 2>/dev/null | cut -d' ' -f1 $EQUIV \
| sort -u | grep '^[A-Za-z0-9]'`
if [ $? -ne 0 ]; then
echo "There are no entries in the '$EQUIV' file
None can be deleted!\n"
exit
fi
echo "\nThis is the current list of equiv entries known to the $PACKAGE:\n"
echo "${syslist}" | pr -t -w80 -4
equivname=`chkyn ${flags} -fer '
Which equiv entry do you want to delete? [q]' \
'.' 'You must enter at least one character.' \
'^[a-zA-Z0-9]' 'First character must be a letter or number.'`
idline=`grep "${equivname}" $EQUIV`
if [ $? -eq 0 ]
then
echo "\nHere is the equiv file entry for machine '${equivname}'."
cat <<-! |while read a b c; do /bin/sh _equivprint $a $b $c; done
${idline}
!
if chkyn ${flags} -h'?' -H"
If you answer y '${equivname}' will no longer be known to the $PACKAGE." \
-f "Do you want to delete the equiv entry named '${equivname}'?"
then
ed - $EQUIV <<-! > /dev/null 2>&1
H
g/${equivname}/d
w
q
!
if [ $? != 0 ]
then
admerr $0 Could not edit $EQUIV
exit 1
fi
echo "\n **** equiv entry '${equivname}' has been deleted from '$EQUIV' ****\n"
fi
else
echo "\n\\t'${equivname}' does not exist in '$EQUIV'.\n"
fi
done