#!/bin/sh

#	diskspaceScript
#
#	Derived from:	New script
#
#	Author:		Anthony Shaughnessy
#
#	Created on:	23rd July 1993
#
#	Sccs ID:	@(#)diskspaceScript.sh	1.1 7/26/93
#
#	Coding Stds.:	2.0
#
#	Purpose:	This script is called by the instwrap program when it
#			detects that inst has complained about the installation
#			due to a lack of disk space. It only really needs to
#			output a meaningful message, with some hints as to 
#			what the user can do about it. This is because the
#			output from inst is directed to /dev/null, and so the
#			user does not see the inst error messages.
#

# If the SoftPC directory is a symlink, then df it to find the real file system
# it is on, otherwise df /usr.
# We can't just blindly df /usr/lib/SoftPC, because it may not exist.

echo "\n"
if test -l /usr/lib/SoftPC
then
	/bin/df -k /usr/lib/SoftPC
else
	/bin/df -k /usr
fi
echo "\n"

echo "The installation has failed due to a lack of disk space on the file
system containing the /usr/lib/SoftPC directory. The SoftPC installation
requires approximately 30Mb of disk space.
Please create some space before reinstalling."
