DataMuseum.dk

Presents historical artifacts from the history of:

Regnecentalen RC-900

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

See our Wiki for more about Regnecentalen RC-900

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T u

⟦850de24ad⟧ TextFile

    Length: 1340 (0x53c)
    Types: TextFile
    Names: »usr/admin/umountfsys «

Derivation

└─⟦3d8f416b2⟧ Bits:30004042/core2.imd SW95705I 386/ix Multi-user Release 1.2
    └─⟦this⟧ »usr/admin/umountfsys « 

TextFile

#ident	"@(#)sadmin:admin/umountfsys	2.8"
#	Unmount a removable medium file system.
#help#
#help#	Umountfsys unmounts a file system, allowing you to remove the medium.

#!	chmod +x ${file}

flags="-qq -k$$"
trap 'exit 0' 1 2 15

unset disklabelarg umountit patterns

while getopts p:y c 
do
	case "$c" in
	p )
		patterns=$OPTARG
		;;
	y )
		disklabelarg=-y
		umountit=yes
		;;
	\? )
		echo >&2 "Usage:  `basename $0` [ -p pattern ] [ -y ]
-y	unmount the removable medium file system without asking any questions"
		exit 1
		;;
	esac
done

shift `expr $OPTIND - 1`
if [ $# != 0 ]
then
	echo >&2 "Usage:  `basename $0` [ -p pattern ] [ -y ]
-y	unmount the removable medium file system without asking any questions"
	exit 1
fi

dir=${0}.d
if [ -z "${patterns}"  -a  -d ${dir} ]
then
	patterns=`ls ${dir} 2>/dev/null`
fi

ddrive=`selectdevice -b $$ /dev/SA ${patterns}`
ndrive=`drivename ${ddrive}`

if [ -n "${patterns}" ]
then
	. ${dir}/`selpattern ${ddrive}`
fi

mounted=`/etc/mount  |  sed -n "\\;${ddrive};s;^\([^ ]*\) on ${ddrive} .*;\1;p"`

if [ -z "${mounted}" ]
then
	echo "No removable medium file system is mounted on the ${ndrive}."
	exit 0
fi
if test ${umountit}  ||  checkyn ${flags} -f "Do you wish to unmount '${mounted}'?"
then
	diskumount -n "${ndrive}" ${ddrive} ${mounted}  ||
		echo "	Correct the problem and try again."
fi