#!/bin/bash
################################################################################
# Name: /IBM/bin/IBMdf
# Purpose: Workaround for "df" and "mount" command problems because of having
#          specific machine mtab files linked to /tmp/mtab
################################################################################

# Remove /tmp/mtab if there is one
if [ -f /tmp/mtab ]; then
	rm -f /tmp/mtab
fi

# Build /tmp/mtab for the df command to work
cat /proc/mounts > /tmp/mtab

# Call the df command the user really wanted
/bin/df $*

# Remove /tmp/mtab so the mount command still works
if [ -f /tmp/mtab ]; then
	rm -f /tmp/mtab
fi
