Oh, and I suppose it may be necessary to do smartctl -s on /dev/hda once before all of the other commands are issued.