From: <jam...@te...> - 2002-08-27 19:44:52
|
Hi Jamie, I am trying to build a trimmed down RPM of webmin for our internal purposes and came across what I believe is a discrepency (or maybe its not). In the webmin init script you have the following comments: # chkconfig: 235 99 00 # description: Start or stop the Webmin server Which of course are for the chkconfig program. What I find strange is that your RPM's specfile does not use the chkconfig command to setup the sybolic links for the init script but instead do these as files that are part of the package. Furthermore in the spec file you are setting the init scripts links to have it run at different priority (or order) than you have in your chkconfig entry in the init script: /etc/rc.d/rc2.d/S99webmin /etc/rc.d/rc3.d/S99webmin /etc/rc.d/rc5.d/S99webmin /etc/rc.d/rc2.d/K10webmin /etc/rc.d/rc3.d/K10webmin /etc/rc.d/rc5.d/K10webmin Furthermore, and I just noticed this, you have kill scripts in the same run level as your start scripts. So my questions are: - Which priorities do you consider correct (I am assuming the links in the spec file, but I figure I would ask)? - Why don't you use chkconfig? I will most definately alter the package for my purposes to use it, but I was wondering if you had a reason? - Did you really mean to have kill and start scripts in the same run level? I thought the kill scripts belonged in the run levels where you don't want webmin to run, such as 0, 1, and 6. Cheers...james |
From: Jamie C. <jca...@we...> - 2002-08-28 01:02:36
|
jam...@te... wrote: > Hi Jamie, > > I am trying to build a trimmed down RPM of webmin for our internal purposes > and came across > what I believe is a discrepency (or maybe its not). In the webmin init > script you have the following > comments: > > # chkconfig: 235 99 00 > # description: Start or stop the Webmin server > > Which of course are for the chkconfig program. What I find strange is that > your RPM's specfile does > not use the chkconfig command to setup the sybolic links for the init > script but instead do these > as files that are part of the package. Furthermore in the spec file you > are setting the init scripts > links to have it run at different priority (or order) than you have in your > chkconfig entry in the > init script: > > /etc/rc.d/rc2.d/S99webmin > /etc/rc.d/rc3.d/S99webmin > /etc/rc.d/rc5.d/S99webmin > /etc/rc.d/rc2.d/K10webmin > /etc/rc.d/rc3.d/K10webmin > /etc/rc.d/rc5.d/K10webmin > > Furthermore, and I just noticed this, you have kill scripts in the same run > level as your start scripts. > > So my questions are: > > - Which priorities do you consider correct (I am assuming the links > in the spec file, but > I figure I would ask)? The links in the spec file are the correct priorities.. I will fix the init script to match them. > - Why don't you use chkconfig? I will most definately alter the > package for my > purposes to use it, but I was wondering if you had a reason? Just because it is not always available. It seems to be a redhat-specific thing, so I didn't want to depend upon its existance. > - Did you really mean to have kill and start scripts in the same run > level? I thought the > kill scripts belonged in the run levels where you don't want > webmin to run, such > as 0, 1, and 6. To be honest, I'm not really sure about that! Aren't the K scripts for a runlevel run when leaving it? So if you booted to runlevel 5, S99webmin would be run at boot time.. When shutting down (and so leaving runlevel 5) K10webmin would be run. Correct me if I am wrong in my understanding of how init scripts work on shutdown though. - Jamie |
From: Joe C. <jo...@sw...> - 2002-08-28 01:40:38
|
Jamie Cameron wrote: > jam...@te... wrote: > >> - Did you really mean to have kill and start scripts in the same >> run >> level? I thought the >> kill scripts belonged in the run levels where you don't want >> webmin to run, such >> as 0, 1, and 6. > > > > To be honest, I'm not really sure about that! Aren't the K scripts for a > runlevel > run when leaving it? So if you booted to runlevel 5, S99webmin would be > run at boot time.. > When shutting down (and so leaving runlevel 5) K10webmin would be run. > > Correct me if I am wrong in my understanding of how init scripts work on > shutdown though. My understanding was the same as James. My impression was that the kill scripts run as you switch into a runlevel. Thus rc6.d contains a ton of K scripts and only two S scripts (S00killall and S01reboot) and rc0.d is the same except S01halt replaces S01reboot. telinit <somelevel> should prove it quickly...I'm not at a machine I can do a runlevel change on at the moment, but I reckon James is right. This is one of those simple things that I rarely dig into though. It just works, so why bother understanding it? ;-) Anyway, in my RPMs I've gone under the assumption that you start it in runlevels where you want it to run and kill it in levels where you don't (thus network gets killed in level 1..actually everything gets killed there except S00single). I may be wrong, but it seems to work. Then again, so does Webmin! ;-) -- Joe Cooper <jo...@sw...> Web caching appliances and support. http://www.swelltech.com |
From: Jamie C. <jca...@we...> - 2002-08-28 11:45:24
|
Joe Cooper wrote: > Jamie Cameron wrote: > >> jam...@te... wrote: >> >>> - Did you really mean to have kill and start scripts in the >>> same run >>> level? I thought the >>> kill scripts belonged in the run levels where you don't want >>> webmin to run, such >>> as 0, 1, and 6. >> >> >> >> >> To be honest, I'm not really sure about that! Aren't the K scripts for >> a runlevel >> run when leaving it? So if you booted to runlevel 5, S99webmin would >> be run at boot time.. >> When shutting down (and so leaving runlevel 5) K10webmin would be run. >> >> Correct me if I am wrong in my understanding of how init scripts work >> on shutdown though. > > > My understanding was the same as James. My impression was that the kill > scripts run as you switch into a runlevel. Thus rc6.d contains a ton of > K scripts and only two S scripts (S00killall and S01reboot) and rc0.d is > the same except S01halt replaces S01reboot. > > telinit <somelevel> should prove it quickly...I'm not at a machine I can > do a runlevel change on at the moment, but I reckon James is right. > > This is one of those simple things that I rarely dig into though. It > just works, so why bother understanding it? ;-) > > Anyway, in my RPMs I've gone under the assumption that you start it in > runlevels where you want it to run and kill it in levels where you don't > (thus network gets killed in level 1..actually everything gets killed > there except S00single). I may be wrong, but it seems to work. Then > again, so does Webmin! ;-) Looks like you are right .. all the other init scripts on my system have their S links in rc3.d, rc4.d and rc5.d , and their K links in rc0.d , rc1.d and rc6.d . So I'll make the Webmin RPM do the same thing .. - Jamie |