Re: seti service script - proper run level (still problems)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



At 14:35 4/22/2004, you wrote:
However, I want to find my error in the runlevel method.

Answers:

1. I'm not running X at boot, thus I used runlevel 3.
2. I created the link in Gnome/Nautilus (eek! I know, probably not right, I guess).

Have you tried making your initscript chkconfig-compliant? As far as I know it takes very little effort: just make sure that start, stop, and restart parameters are available and add one line near the top. The script should start (for example) like this:


#!/bin/bash
# chkconfig: 2345 40 40

This means that it should be started when switching to runlevels 2, 3, 4, and 5 (and be killed in all others), and be #40 when starting and #40 when stopping. The numbers are any number from 01 to 100; just check the order of the links in runlevel 3 and see where you want yours to start. If you want your script to run only in runlevel 3 and be started after all major services have loaded, you can make it start as 98; then, since this service should stop early in the shutdown process, you can stop it as number 02 or another low number. Your chkconfig line would then be:

# chkconfig: 3 98 02

Then, all you have to do is put your script (named seti in this case) into /etc/rc.d/init.d/ and (as root) issue this command:

# chkconfig --add seti

Should work well, and creates/deletes all the right symlinks by default. Delete the ones you had made manually to remove the possibility of conflicts.

Cheers,


-- Rodolfo J. Paiz rpaiz@xxxxxxxxxxxxxx http://www.simpaticus.com



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux