This perl script blocks access to the online distractions of your choice for a set period, and removes root access meanwhile. Reboot to override.
Please see the walkthrough here:
http://archive09.linux.com/feature/116324
In a word, keep a root terminal open while testing, then if something goes wrong it will be easy to fix. This package is patched to work with dcron.
http://people.salixos.org/mimosa/packag ... h-1tjb.txz
The default setup involves editing /etc/hosts, but see the man page for a more complex suggestion.
EDIT Note that crond should now run automatically on installation; the original version of the package didn't work properly till dcron did its hourly check.