|
|
DataMuseum.dkPresents historical artifacts from the history of: ICL Comet 32 |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about ICL Comet 32 Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - download
Length: 958 (0x3be)
Types: TextFile
Notes: UNIX file
Names: »rcfile«
└─⟦26887b7e0⟧ Bits:30009717 Comet 32 harddisk image
└─⟦28c352965⟧ »/a« UNIX Filesystem
└─⟦this⟧ »sys/build/rcfile«
#! /bin/csh -f
while (1)
set name = `ask rcname "Give a name to this machine:"`
switch ("$name")
case quit:
exit(1)
endsw
echo "Executing: hostname $name > /dev/null"
hostname "$name" > /dev/null
if ($status) then
switch (`ask ynhname "Error - try again?"`)
case quit:
exit(1)
case no:
unset name
breaksw
case y:
case yes:
continue
endsw
endif
break
end
switch (`ask rcacct "Turn on accounting in /etc/rc?"`)
case quit:
exit(1)
case n:
case no:
unset acct
breaksw
case y:
case yes:
set acct
breaksw
endsw
echo ""
echo "Writing /etc/rc file"
if ($?name) then
set namesub = "s#^\#HOSTNAME#hostname $name#"
else
set namesub = "s#^\#HOSTNAME#: hostname kohoutek#"
endif
if ($?acct) then
set acctsub = "s#^\#ACCTON#/etc/accton /usr/adm/acct#"
else
set acctsub = "s#^\#ACCTON#: /etc/accton /usr/adm/acct#"
endif
sed -e "$namesub" -e "$acctsub" $subs/rc > /tmp/rc
wrfile wrrcfile /tmp/rc /etc/rc
if ($status) exit(1)