Creating links to an init script.
Hi guys.
I have two questions in my homework: 1. What would you name the link to an init script that would start the fictitious bigd daemon early in the boot process? 2. What would you name the link to kill the same daemon? I'm not asking you to answer these questions, I just want to know whether or not my answers are correct: 1. I will name the link /etc/rc.d/rcN.d/S01bigd, where N is the runlevel the system is entering. 2. I will name the link /etc/rc.d/rcN.d/K01bigd, where N is the runlevel the system is entering. Your help would be appreciated :) |
Hello and welcome to LinuxQuestions,
As you indicated this is homework and knowing the rules, you'll not encounter a lot of help solving it. You provided a solution to your homework. First of all you'll have to take into account that not all distros use the same structure, for example Debian (and the likes) have their init scripts in /etc/rcN.d directly. The /etc/rc.d is used for example by RedHat. Furthermore have another look at your S(tart) and K(ill) sequences remembering why they are used in that way. Those or some tips to point you in the right direction. Kind regards, Eric |
Thank you, Eric.
|
Good attempt :)
I am not familiar with all distros (and the boot scripts mechanism is one area where distros differ) but ... The question is not well phrased because "early in the boot process" is imprecise. You answer is similarly imprecise because the booting system does not go immediately to the default run level so "the runlevel the system is entering" begs the question "Which run level". If "early" is very early, you might want to create the startup link /etc/rc.d/rcS.d/S01bigd because run level S is entered before the default run level. But few daemons are started in run level S and few in run level <default run level> before S20; as run level S is initialised and in run level <default run level> before S~20, core Linux components are being initialised which are pre-requisites for most daemons. The default for most daemons is /etc/rc.<default run level>/S20; hence a bunch of startup script symlinks are have /etc/rc.<default run level>/S20* symlinks; hence "early" for a normal daemon would be /etc/rc<default run level>.d/~S19. Much depends on whether the daemon requires file systems to be mounted and networking to be fully initialised (initialising networking, including networked file systems, takes relatively a long time). Regards killing the daemon, this is normally done in /etc/rc.[06].d where the kills are done in reverse order from the startups so a daemon started by /etc/rc<default run level>.d/~S99<something> is killed first with a /etc/rc.[06]/K00<something> and a daemon started by /etc/rc<default run level>.d/~S01<something> is killed first with a /etc/rc.[06]/K99<something>. This better serves any interdependencies amongst the daemons. |
Quote:
1. Distro, I'm working with now is Fedora 8.0. 2. I believe, my instructor meant "as early as possible" :) Quote:
Anyway, thank you guys for your willing to help a newbie :) |
All times are GMT -5. The time now is 12:06 AM. |