Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
hprofile, hostname and runlevels
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
brain salad surgery
Apprentice
Apprentice


Joined: 21 Apr 2004
Posts: 216

PostPosted: Sun Aug 28, 2011 11:35 pm    Post subject: hprofile, hostname and runlevels Reply with quote

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
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20067

PostPosted: Sun Sep 04, 2011 3:21 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
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