|
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 - download
Length: 2951 (0xb87) Types: TextFile Notes: UNIX file Names: »ftsmgmt«
└─⟦104d96909⟧ Bits:30004765 SW95718I UNIX LAN Server Rel. 1.1 └─⟦104d96909⟧ UNIX Filesystem └─ ⟦this⟧ »LS/new/usr/admin/menu/packagemgmt/ftsmgmt«
#ident "@(#)ftsmgmt 1.1, RC International, 90/01/12" #menu# Start/stop FTS server (File Transfer Service) #help# #help# The FTS server offers file transfer services to computers #help# connected to RcLAN. The server can be accessed via the RcLAN #help# by the file transfer utilities rr and wr. trap 'exit 0' 1 2 3 9 15 flags="-qq -k$$" INITTAB=/etc/inittab sco2num() { case $1 { reg*) echo 2;; *) echo 3;; } } num2sco() { case $1 { 2) echo regional;; *) echo global;; } } card2num() { case $1 { com2*) echo 4;; com1*) echo 3;; lan2*) echo 2;; *) echo 1;; } } num2card() { case $1 { 4) echo com2;; 3) echo com1;; 2) echo lan2;; *) echo lan1;; } } FTSCOPES="`num2sco 2` `num2sco 3`" FTSCARDS="1:`num2card 1`, 2:`num2card 2`, 3:`num2card 3`, 4:`num2card 4`" CARDCHOISE="1 2 3 4" while : ; do SERV=`grep '^fts:' $INITTAB 2>/dev/null | cut -d: -f4- | tail -1` SCOPE=`expr "//$SERV" : '.*-s[ ]*\([1-3]\)' \| 2` SCOPE=`num2sco $SCOPE` CARD=`expr "//$SERV" : '.*-a[ ]*\([1-4]\)' \| 1` CARD=`num2card $CARD` FINC=`expr "//$SERV" : '.*-i[ ]*\([0-9]\{1,\}\)' \| 4` if [ "$SERV" = "" ]; then echo " The FTS server is now disabled" inst=`checkyn ${flags} -fe -H" This procedure sets up the file transfer service, allowing other machines to access files and run programs on this machine via RcLAN" " Do you wish to set up the FTS?"` if [ "${inst}" = "n" ] then break fi NEWCARD=`checklist ${flags} -fep -H" The adaptername specifies on which adapter the FTS service will be started. The lan1 is the first MF310/MF311 adapter, and the com1 is the first MF320 adapter." -D "$CARD" " Possible adapters are: $FTSCARDS. Enter the adapter for FTS (default: $CARD) [1, 2, 3, 4, q, ?]?" $CARDCHOISE` NEWCARD=`num2card $NEWCARD` NEWSCO=`checklist ${flags} -fep -H" The scope specifies the visibility of the FTS server in the network. Global means that every machine sees it, regional means only those machines in the same region." -D "$SCOPE" " Possible scopes are: $FTSCOPES. Enter the scope for FTS (default: $SCOPE) [r, g, q, ?]?" $FTSCOPES` if checkyn ${flags} -f "Do you want to start a $NEWSCO FTS on adapter $NEWCARD?" then echo " Enabling FTS..." if echo "fts:23:respawn:sh -c '. /etc/TIMEZONE;exec /etc/fts -s `sco2num $NEWSCO` -i $FINC -a `card2num $NEWCARD` >/dev/null 2>&1 </dev/null'" >> $INITTAB then : else echo "Modification of $INITTAB failed!!" fi fi else echo " FTS is running on adapter $CARD with $SCOPE scope" inst=`checkyn ${flags} -fe -H" This procedure removes the file transfer service thus disabling other machines from access to files and programs on this machine via RcLAN" " Do you wish to disable the FTS server?"` [ "${inst}" = "n" ] && break echo " Disabling FTS..." ed - >/dev/null 2>&1 $INITTAB <<-! g/^fts:/d w q ! if [ $? != 0 ];then echo "Modification of $INITTAB failed!!" fi fi chmod 444 /etc/inittab chgrp bin /etc/inittab chown bin /etc/inittab /etc/init q done exit