views:

124

answers:

1

Hi!

We develop a Linux application to work on different RedHat/SUSE distributions. This application (namely, daemon) is expected to be automatically run at startup so we place our startup script in /etc/init.d/ directory and create symlinks in runlevel directories (../rc.d/rc5.d/, for instance). If a user removes our application, our uninstall script removes all our stuff including symlinks. It works fine if OS doesn't provide parallel script running. If parallel running is enabled, we need another solution. For instance, in SLES 10, we have in /etc/sysconfig/boot:

# Run all scripts or rather start/stop all services
# which are independent from each other in parallel.

RUN_PARALLEL="yes"

As far as we understand, we have to register our script with insserv utility. In this case, the system analyzes a script header and creates/removes symlinks on it's own. If it's true, how to organize installation/uninstallation of our application to cover both parallel and sequential startup script running? It looks like we should behave differently when parallel running is disabled or enabled. In first case, we should care about symlinks ourselves. In second case, we should delegate it to insserv. Is this right approach? If it's true, should we analyze whether parallel running is enabled by checking /etc/sysconfig/boot? It looks unreliable because in different Linux distributionsit could be different location and different parameter.

What's the best practice for installation/uninstallation Linux application that covers both parallel and sequential system startup?

Thanks,

A: 

You should use chkconfig to manage init scripts on RedHat and SuSE.

Maxwell Troy Milton King
Don't bother: http://serverfault.com/questions/101863/how-to-install-a-linux-application-in-cases-when-parallel-startup-scripts-running
Tobu