LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Custom Task During Bootup (https://www.linuxquestions.org/questions/linux-newbie-8/custom-task-during-bootup-695881/)

emmitt1219 01-08-2009 12:14 PM

Custom Task During Bootup
 
We are running RHEL 5.2 on vmware. What we are trying to do is to have a custom task that gets executed during the boot process. This custom task will -

1) make partition(s) on a new slave drive (hd space allocated manually outside of the original image) - fdisk would work (as is part of distro)
2) make filesystem - mkfs.ext3 on target partition(s)
3) create directory and allow access - like chmod 777
4) mount target partition
5) copy certain files/directories onto the target partition from a separate source partition.

I am thinking about putting a script in rc3.d to achieve these tasks. However, it seems to me that most tasks in executed by the init process during boot time are programs/services whereas I am just looking to execute a script during the boot process. I am wondering if there is another place where I can place my script or the init program is where I should have it.

Thanks in advance.

repo 01-08-2009 12:15 PM

/etc/rc.local

emmitt1219 01-08-2009 12:36 PM

Hi repo. That makes sense. Then my script gets executed every time the box boots up or when it boots into a different runlevel. Let me give that a try. Thank you for your help!


All times are GMT -5. The time now is 09:31 PM.