LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Init/Boot Script Dilemma (https://www.linuxquestions.org/questions/linux-general-1/init-boot-script-dilemma-766845/)

kevinbenko 11-04-2009 11:34 AM

Init/Boot Script Dilemma
 
I had a problem with my system (Debian; testing/unstable branch), the nature of which is unimportant. The problem is init/boot script related. It seems that some services (udev and lvm2) need to be started earlier in the boot sequence than the default setup of the packages.

My temporary solution (kludge) is to put an appropriately-named script in the /etc/rcS.d/ directory that starts these two services earlier than the default setup. Everything seems to be working almost-perfectly, now, but I want to have a less sloppy fix for the problem.

I've weighed the options, and they all seem to balance out for me.... none seems better than the others, and I would like some input/feedback in case I missed something.

The options:

1: Keep the kludge, as is.
+ it's easy to see that there is a kludge, and I can easily change the script in the future if there are any changes in the package names (like for example, when lvm became lvm2)
- I've got two services starting when they have already been started.... this is unnecessary.

2: Rename the appropriate files in /etc/rcS.d/ such that the problem services will start earlier in the boot process, and get rid on my kludge.
+ it tidy's up the /etc/rcS.d directory, there is no obvious kludge in there, it more properly complies with the sysV init standards.
- It will not be apparent to anyone that there has been a renaming of the files in /etc/rcS.d/ and some future upgrade could booger things up, and it will be more difficult to find.

3: Use some other init/boot structure other than the sysV structure
+ I know that this problem was a direct result of the sysV structure, some other boot/init structure could work better.
- I like the sysV way of doing these things, I would need to learn to use another init structure and deal with the learning curve involved.

Like I said... the pros and cons seem to be pretty well balanced to me, and no one solution is any better or worse than any other solution.

Anyone out there have any opinion about this?

pljvaldez 11-04-2009 11:40 AM

I would opt for #2 if it's a production system, since you're familiar with it and it's the "proper" way of dealing with it. If it's a development system for a future production system, I would go to option #3 because most distros are moving to event based init systems that start things up in a logical order. For example, it won't start the samba or ftp daemons until after networking is up. If networking fails for whatever reason, it won't bother starting samba or ftpd.


All times are GMT -5. The time now is 10:06 AM.