#!/bin/sh

if [ "`whoami`" = "root" ]
then
 if [ -z $1 ]
 then
  echo "Usage: bug.sh <file-system> (Where <file-system> is in /etc/fstab
	and is already mounted and has userquota option enabled)"
  exit 1
 else
  touch $1/quota.user
  umount $1
  mount $1
  quotaon $1
  sync
  mkdir $1/bug
  sync
  echo "Please wait 30 seconds to trigger the bug (if not triggered already)"
  sleep 30
  sync
  echo "You should be frozen now"
  exit 0
 fi
else
 echo "You must be root to run this script"
 exit 1
fi

