|
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
Length: 2287 (0x8ef) Types: TextFile Names: »usr/admin/menu/ttymgmt/sunterm «
└─⟦3d8f416b2⟧ Bits:30004042/core2.imd SW95705I 386/ix Multi-user Release 1.2 └─⟦this⟧ »usr/admin/menu/ttymgmt/sunterm «
# # Copyrighted as an unpublished work. # (c) Copyright 1987 INTERACTIVE Systems Corporation # All rights reserved. # # RESTRICTED RIGHTS # # These programs are supplied under a license. They may be used, # disclosed, and/or copied only as permitted under such license # agreement. Any copy must contain the above copyright notice and # this restricted rights notice. Use, copying, and/or disclosure # of the programs is strictly prohibited unless otherwise provided # in the license agreement. # #ident "@(#)sunterm 1.3 - 88/05/03" #menu# change number of active SunRiver Stations #help# #help# This subcommand allows you to change the number #help# of active SunRiver Stations. trap exit 1 2 15 ed_it() { ed /etc/inittab <<EOT >/dev/null 2>&1 g/$1/s/:$2:/:$3:/ w q EOT } show_actv() { max=$1 shift num=0 onterm=0 echo while [ "$max" -gt 0 ] do onterm=`eval 'grep $1 /etc/inittab | grep :respawn: | wc -l'` if [ "$onterm" -gt 0 ] then echo "SunRiver Station $num is activated" else echo "SunRiver Station $num is not activated" fi max=`expr $max - 1` num=`expr $num + 1` shift done } activate_sr() { arg=$1 if [ "$arg" = "add" ] then echo "\nEnter the SunRiver Station you wish to activate [(number), q]: \c" else echo "\nEnter the SunRiver Station you wish to Deactivate [(number), q]: \c" fi read newnum newnum=${newnum:=0} if [ "$newnum" = "q" -o "$newnum" = "Q" ] then break fi if [ "$newnum" -gt 3 ] then echo "invalid number▶07◀" continue fi term="\/dev\/st$newnum" if [ "$arg" = "add" ] then ed_it $term off respawn echo "\nActivated SunRiver Station $newnum" else ed_it $term respawn off echo "\nDeactivated SunRiver Station $newnum" fi } flags="-qq -k$$" ttylist='/dev/st0 /dev/st1 /dev/st2 /dev/st3' availnum=4 show_actv $availnum $ttylist echo "\nDo you wish to activate a SunRiver Station [y,n,q]?: \c" read resp if [ "$resp" = "q" -o "$resp" = "Q" ] then exit fi if [ "$resp" = "y" -o "$resp" = "Y" ] then activate_sr add fi echo "\nDo you wish to DEactivate a SunRiver Station [y,n,q]?: \c" read resp if [ "$resp" = "q" -o "$resp" = "Q" ] then exit fi if [ "$resp" = "y" -o "$resp" = "Y" ] then activate_sr remove fi /etc/init q || admerr $0 Cannot signal /etc/init. exit