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

⟦4b5ca3cb9⟧ TextFile

    Length: 1778 (0x6f2)
    Types: TextFile
    Notes: UNIX file
    Names: »mountem«

Derivation

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

TextFile

#! /bin/csh -f

if (! -f $subs/partab) then
	echo "No partition info - do previous step first"
	exit(0)
endif
source $subs/partab

if (! -f $subs/autohelp) then
	echo ""
	echo "Type first 'h' (help) to next question."
endif

while (1)
	set part = `ask partmnt "Give partition (dc1d to dc1h):"`
	switch ($part)
	case quit:
		echo "Skipping write of /etc/fstab"
		exit(1)
	case show:
		source $build/shoprtb
		continue
	case dc1[d-h]:
		eval @ size = \$$part\[1\] / 2
		eval set fsflag = \$$part\[2\]
		breaksw
	case done:
		break
	endsw
	if ($size == 0 || "$fsflag" == "-") then
		echo ""
		echo "Looks like you don't have a file system here:"
		echo ""
		(source $build/shoprtb) | fgrep $part
		switch (`ask ynfilsys "Continue anyway?"`)
		case quit:
			exit(1)
		case n:
		case no:
			continue
		endsw
	endif
	set mdir = `ask mntdir "Give directory to mount $part on:"`
	switch ($mdir)
	case quit:
		exit(1)
	case umount:
		umount /dev/$part
		set ${part}[3] = "-"
		continue
	endsw
	grep "^${mdir}:" $subs/nomount > /dev/null
	if ($status == 0) then
		echo "Directory $mdir is already part of dc1a"
		continue
	endif
	makedir $mdir
	if ($status) continue
	if (`ls $mdir | wc -l` != 0) then
		echo "Directory $mdir is not empty - cannot continue"
		continue
	endif
	cd /
	umount /dev/$part >& /dev/null
	echo ""
	echo "Executing: mount /dev/$part $mdir"
	mount /dev/$part $mdir
	if ($status) continue
	set ${part}[2] = filsys
	set ${part}[3] = $mdir
end

source $build/wriprtb

echo ""
echo "Writing /etc/fstab"
echo > /tmp/fstab
@ count = 0
foreach p (dc1a dc1d dc1e dc1f dc1g dc1h)
	eval set dir = \$$p\[3\]
	if ("$dir" == "-") continue
	@ count = $count + 1
	echo "/dev/${p}:${dir}:rw:1:${count}" >> /tmp/fstab
end

wrfile wrfstab /tmp/fstab /etc/fstab
if ($status) exit(1)