DataMuseum.dk

Presents historical artifacts from the history of:

ICL Comet 32

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about ICL Comet 32

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download

⟦7713e119b⟧ TextFile

    Length: 958 (0x3be)
    Types: TextFile
    Notes: UNIX file
    Names: »rcfile«

Derivation

└─⟦26887b7e0⟧ Bits:30009717 Comet 32 harddisk image
    └─⟦28c352965⟧ »/a« UNIX Filesystem
        └─⟦this⟧ »sys/build/rcfile« 

TextFile

#! /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)