Place to put a certain script to be run at boot time.
Hi:
Where could I place the following script to make it execute each time I boot?: Code:
(a) /etc/inittab (b) /etc/profile (c) /etc/rc.d/rc.local I put it in profile with no effects. As to inittab I refrained from touching it. Perhaps rc.local? Kernel 2.6.21.5 Slackware 12.0 |
Quote:
|
my bet would be on rc.local.
i usually add an entry in crontab like so: Code:
@reboot /run/this/script |
it would be best to use absolute path instead of relative path if you are going to put it on your rc.local
|
rc.local was my first choice, and it did nothing. 'ps -C kbd_monitor', as it is in /usr/bin/, shows it isn't running.
|
I did used the absolute path.
|
Did you remember to
Code:
chmod +x /etc/rc.d/rc.local |
You won't need the 'sudo' either, as rc.local will run as root on boot.
|
Thanks, I did not use the sudo, of course. But now, having put the full pathname of setsid, it starts after boot. Cool!
|
Quote:
|
i never heard that but i think putting it in rc.local is more leet.
|
A little off-topic but there it goes: what should I do if I want a message written by me output to stdout just after boot to remind me a certain thing? I have tried several places but i'm defeated by the famous slack daily quotation! If it fills the screen then my message cant be read at first sight and anyways, I want it to be the very last thing printed.
|
Quote:
Code:
chmod -x /etc/profile.d/bsd-games-login-fortune.* Code:
Linux 2.6.37.6 |
So all executable files in /etc/profile.d get executed when an interactive login shell runs. But none of them writes stdout as I see, save for bsd-games-login-fortune.sh. Now if I want to retain this together with my message, which script will be run first (mine or bsd-games-login-fortune.sh)? Thanks for an illustrative post.
|
Quote:
Code:
for profile_script in /etc/profile.d/*.sh ; do |
All times are GMT -5. The time now is 09:35 AM. |