if [ -f ~/suspending ]; then
	echo "Already in the process of suspending. Please be patient."
else 
	touch ~/suspending
	sync
	/sbin/rmmod ehci_hcd
	/sbin/rmmod uhci_hcd
	ifdown eth0
	rmmod ipw2100
	killall dhclient
	hwclock --adjust
	chvt 1
	sync
	echo -n mem > /sys/power/state
	vbetool post
	chvt 7
	modprobe ehci_hcd
	modprobe uhci_hcd
	ifup eth0
fi

/etc/init.d/acpid restart
sleep 45 && rm -f ~/suspending
