#634 closed defect (later)
init scripts which run programs of the same name fail on restart
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | low | Milestone: | |
Component: | BOOK | Version: | ~5.0 |
Severity: | trivial | Keywords: | |
Cc: |
Description ¶
As the subject says. The problem is that loadproc calls getpids, which checks for any scripts or other processes of the name which you are trying to call, and if the script has that name (i.e. sshd, which is still in the BLFS book), then it finds the script and thinks it's an instance of the process, and thus prints out "Already running [ ATTN ]" without starting the program.
Strangely, this only happens on restart; it works fine at boot, but if I stop and then start the program, even in two separate stages rather than calling the script with 'restart' as an argument, it does what I've described. Removing the -x from the call to pidof in getpids fixes this, and if I put in a debug line that prints out pidlist, in those instances that it fails it prints a different pid each time the script is run, even if I'm only trying to start the program, which suggests to me that it's finding the script itself. Why it doesn't do this at boot, I don't know.
Change History (5)
comment:1 by , 21 years ago
Status: | new → assigned |
---|
comment:2 by , 21 years ago
Resolution: | → later |
---|---|
Status: | assigned → closed |
comment:3 by , 21 years ago
comment:4 by , 21 years ago
Fixed in lfs-bootscripts-cvs. Also it is not a BLFS bug but an LFS bug since lfs-bootscripts is installed in LFS.
This will be rectified in a new release of lfs-bootscripts. Already fixed in lfs-bootscripts-cvs <http://cvs.linuxfromscratch.org/index.cgi/LFS/bootscripts/rc.d/init.d/functions?rev=1.6&content-type=text/x-cvsweb-markup>.