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

⟦6dfa92f23⟧ TextFile

    Length: 2170 (0x87a)
    Types: TextFile
    Names: »usr/admin/menu/softwaremgmt/removepkg «

Derivation

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

TextFile

#ident	"@(#)sadmin:admin/menu/softwaremgmt/removepkg	2.7"
#menu# remove previously installed package from built-in disk
#help#
#help#	This subcommand show you a list of currently installed optional
#help#	software packages.
#help#	It then will perform whatever actions are necessary to remove
#help#	software packages you specify.
#help#	The removable medium used to "installpkg" the software is needed to
#help#	remove it.

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

lp=`dirname $0`/listpkg
if [ -r ${lp} ]
then
	/bin/sh ${lp}
fi

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

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

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

question="
Insert the removable medium for the package you wish to remove
into the ${ndrive}.
Press <RETURN> when ready.  Type  q  to quit."

while true
do
	fulllabel=`disklabel -q "${question}" $$ ${ddrive}`
	fsname=
	eval `labelfsname "${fulllabel}"`
	case "${fsname}" in
	instal | install )
		trap '	trap "" 1 2
			cd /;  diskumount -n "${ndrive}" ${ddrive}' 0

		/etc/umount ${ddrive} 2>/dev/null
		chmod 700 /install
		/etc/mount ${ddrive} /install -r  ||  exit 1
		;;
	'' )
		echo >&2 '
	This removable medium is NOT labeled and will not work.
	Try another.'
		continue
		;;
	* )
		echo >&2 "
	This removable medium is labeled '${label}' and is not a package.
	The file system name is '${fsname}'.  It should be 'install'.
	The full label is:
${fulllabel}
	Try another."
		continue
	esac

	if [ ! -r /install/install/UNINSTALL ]
	then
		echo >&2 '	This package does will not remove itself.
		Consult the instructions that came with the medium.'
		diskumount -n "${ndrive}" ${ddrive}
		continue
	fi

	trap "	trap '' 1 2
		rm -f /tmp/$$UNINSTALL
		cd /
		diskumount -n '${ndrive}' ${ddrive}" 0

	cd /tmp
	cp /install/install/UNINSTALL $$UNINSTALL
	chmod +x $$UNINSTALL
	trap : 1 2
	/tmp/$$UNINSTALL ${ddrive} /install "${ndrive}"  ||
		echo 'WARNING:  Package removal may not have completed properly.'
	trap '' 1 2
	rm -f /tmp/$$UNINSTALL
	diskumount -n "${ndrive}" ${ddrive}
	trap : 0
	trap exit 1 2
done