LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-26-2007, 05:04 PM   #1
dgr
LQ Newbie
 
Registered: Aug 2007
Posts: 25

Rep: Reputation: 15
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

Last edited by dgr; 09-26-2007 at 05:08 PM.
 
Old 09-26-2007, 05:32 PM   #2
MS3FGX
LQ Guru
 
Registered: Jan 2004
Location: NJ, USA
Distribution: Slackware, Debian
Posts: 5,852

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
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.
 
Old 09-26-2007, 09:17 PM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,240

Rep: Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324Reputation: 2324
On RH, the 'local' startup script you should use to customize startup is
/etc/rc.local
just add to the end of that.
 
Old 09-26-2007, 10:45 PM   #4
dgr
LQ Newbie
 
Registered: Aug 2007
Posts: 25

Original Poster
Rep: Reputation: 15
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Hoe safe to resize partitions? heffo_j Linux - Hardware 2 07-02-2006 11:04 AM
hoe to access second hard drive in linux srnerkar1 Linux - Hardware 1 12-08-2005 06:24 AM
hoe to view pdf files in command mode. bruse Linux - Newbie 7 09-15-2005 11:03 AM
hoe to back up the full lfs system : i got an error Vijiram Linux From Scratch 4 11-03-2004 12:23 PM


All times are GMT -5. The time now is 02:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration