I need to backup some files every time i will shutdown a Red Hat enterprise 4 Linux. I thought about make it with a script in /etc/rc0.d but shutdown process should wait for my script to finish. So the only idea is to make the script run first of all and stop shutdown process, then at the end of the script run shutdown again. Can anyone tell me if is there any other better way to do this? Could work my own idea to make it? Thanks.