LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   how to make a startup script to copy files (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-make-a-startup-script-to-copy-files-587601/)

dgr 09-26-2007 04:04 PM

how to make a startup script to copy files
 
hello,

how do you make a startup script on a red hat linux server that will copy all of the LPT* files (ex. LPT3, LPT7, LPT9) from /u/sting/devbackup to /dev?


thanks in advance,
david

MS3FGX 09-26-2007 04:32 PM

You wouldn't really need a whole script for that, it could be done with just the following lines added to your boot scripts:

Code:

cp /u/sting/devbackup/LPT* /dev/
Though to be honest, you should probably be looking into getting udev to create the files properly, or some other method of automatic generation.

chrism01 09-26-2007 08:17 PM

On RH, the 'local' startup script you should use to customize startup is
/etc/rc.local
just add to the end of that.

dgr 09-26-2007 09:45 PM

all: thank you for your quick replies and help. I've added the line to the end of /etc/rc.local and will see if it works the next time I can reboot the server (it's used constantly, so I'm not sure when I can reboot to test it).

what is the udev/automatic generation that MS3FGX referred to?

thanks,
david


All times are GMT -5. The time now is 07:23 AM.