View previous topic :: View next topic |
Author |
Message |
brain salad surgery Apprentice
Joined: 21 Apr 2004 Posts: 216
|
Posted: Sun Aug 28, 2011 11:35 pm Post subject: hprofile, hostname and runlevels |
|
|
Hello,
I am using hprofile to switch config files depending on the hardware found in dmesg.
This works perfectly using an init script that is added in the boot runlevel (before loading the modules).
I would also like to customize the hostname depending on the hardware found.
The problem is that the hostname script (found also in the boot runlevel) is executed before hprofile.
If I'd like to execute the hprofile init script before the hostname script, do i only
have to add something like in the hprofile's init script ?
depend() {
before hostname
}
Am I right ? |
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20067
|
Posted: Sun Sep 04, 2011 3:21 am Post subject: |
|
|
That's how I understand it, but I haven't messed with that yet. 'need' would be another option:
Dependencies section of Writing Init Scripts wrote: | The need setting is a hard dependency. It means that the script that is need'ing another script will not start before the other script is launched successfully. Also, if that other script is restarted, then this one will be restarted as well. |
_________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|