hello, there is a file in /proc which i want to initialise to a particular value at bootup (i have root access to the concerned system); googling suggests that i should do it using a startup script. is the script being referred to "/etc/inittab"? is there any other script file which i can use for this purpose? if there is, then what might be the pros and cons of using that script file over inittab?
Sometime on Tue, Sep 05, 2006 at 07:41:50AM +0530, Pradnyesh Sawant said:
hello,
there is a file in /proc which i want to initialise to a particular value at bootup (i have root access to the concerned system); googling suggests that i should do it using a startup script. is the script being referred to "/etc/inittab"? is there any other script file which i can use for this purpose? if there is, then what might be the pros and cons of using that script file over inittab?
You might want to write a small one liner shell script with filename S90foobar, chmod u+x for root user, and put it up inside /etc/rcX.d (X=your default runlevel, or rcS.d for all runlevels).
Anurag
Sometime on Tue, Sep 05, 2006 at 07:41:50AM +0530, Pradnyesh Sawant said:
hello,
there is a file in /proc which i want to initialise to a particular value at bootup (i have root access to the concerned system); googling suggests that i should do it using a startup script. is the script being referred to "/etc/inittab"? is there any other script file which i can use for this purpose? if there is, then what might be the pros and cons of using that script file over inittab?
Hi, Not sure which OS you are using. This is just FYI. In case of Redhat based distro, there are two startup scripts. /etc/rc.sysinit and /etc/rc.local
rc.sysinit is the main startup script used and rc.local is the next script which runs after the whole boot process ends. Write a shell script for updating the file under /proc and put wherever you want.
On 06 Sep, 01:12:24 PM, Pushparajan V wrote:
Hi, Not sure which OS you are using. This is just FYI. In case of Redhat based distro, there are two startup scripts. /etc/rc.sysinit and /etc/rc.local
I am using Debian sarge (sorry for not mentioning earlier), so both the above mentioned files are absent. However, the solution provided by anurag worked.
Thanks a lot!
On 9/6/06, Pradnyesh Sawant pradnyesh@iitg.ernet.in wrote:
On 06 Sep, 01:12:24 PM, Pushparajan V wrote: I am using Debian sarge (sorry for not mentioning earlier), so both the above mentioned files are absent.
With Debian it would be a good idea to put the script in /etc/init.d and put symlinks to the script in /etc/rcX.d/
Regards,
On Sunday 10 September 2006 06:42, Siddhesh Poyarekar wrote:
On 9/6/06, Pradnyesh Sawant pradnyesh@iitg.ernet.in wrote:
On 06 Sep, 01:12:24 PM, Pushparajan V wrote: I am using Debian sarge (sorry for not mentioning earlier), so both the above mentioned files are absent.
With Debian it would be a good idea to put the script in /etc/init.d and put symlinks to the script in /etc/rcX.d/
Checkout update-rc.d :)