[CentOS] Launch many scripts with reboot

Thu Feb 11 14:36:02 UTC 2010
Georghy <fusco at wanagain.net>

Les Mikesell a écrit :
> Georghy wrote:
>   
>> Kai Schaetzl a écrit :
>>     
>>> Georghy wrote on Thu, 11 Feb 2010 12:42:21 +0100:
>>>
>>>   
>>>       
>>>> I'm using different scripts to configure different things and after 
>>>> these scripts I'm forced to reboot in order to use the new parameters
>>>>     
>>>>         
>>> It's quite uncommon that you have to reboot for that. Especially going by 
>>> your quote "many".
>>>
>>> Kai
>>>
>>>   
>>>       
>> by "many" I mean 5-6 scripts
>>     
>
> Do these need to run as root?  And do they really need to wait for a user to log 
> in or can they write their output to a file to be viewed later?  You can put a 
> line in /etc/rc.d/rc.local to run your script which you can change each time as 
> you want.  And you can add >>/path/to/logfile on the command if you want it to 
> be saved.   If you want something to run as the user at login, it can go in 
> .profile or .bash_profile in the user's home directory.
>
>   
I use .bash_profile and it works great

for now i want to display the computer IP adress just before the user login

my command is :
ifconfig | grep "inet addr" | awk '{print $2}' | sed s/addr:// | head -n 1
and it works after logon
but I want to display it before the user logon
do you know how to do this ?

-- 
Cordialement, / Greetings,
Georghy FUSCO