Actually, it's a good idea to run all hack scripts in rc file as a background process with a delay like below. running in background let's the rc process finish. If one of your scripts hangs while running in foreground, it might prevent you from telnetting in. The delay also let's you have time to telnet in and fix something if one of your scripts goes horribly wrong and makes the box unreachable as soon as it runs.
(
sleep 300
<- hack script commands here
)&
The way I do it is I put all my scripts in /etc/rc.hacks and run that from the main rc scipt as a background process:
/etc/rc.hacks &
The rc.hacks file looks like above witth the initial 300 sec. delay but no parens. If something causes a reboot loop I can telnet in quickly during the 300 second window and rename /etc/rc.hacks to something else so it's no longer in the boot sequence. Then I can run it manually to see where it's screwing up. Once I fix the problem I rename it back so it runs at boot.
perl -e 'print unpack("u","\@2\&\%V92\!Y;W4\@:&\%C:V5D(\%E/55\(\@5\&EV\;R\!T;V1A>3\\-\`"),"\n";'