PDA

View Full Version : [ubuntu] System variables in init.d



jsloan
March 8th, 2009, 03:32 PM
I'm trying to define some variables that can be used in the init.d scripts in a server configuration (i.e. no user logins).

I tried /etc/profile.d but I don't think the variables are available when the init.d scripts are run.

Is there an easy way to do this?

i guess i could write an init.d script that starts early and exports variables before the other init.d scripts start.

sdennie
March 8th, 2009, 04:21 PM
Try editing /etc/init.d/rc. You'll see how the path is set at the top of the file.