On 4/2/21 8:58 AM, Bruce Dubbs wrote:
On 4/2/21 6:29 AM, Scott Andrews wrote:
On 4/1/21 11:06 PM, Bruce Dubbs wrote:
On 4/1/21 7:15 PM, Scott Andrews wrote:
in init-functions start_daemon pidfile is not validated before
removing...
code as follows........
[snip]
# Execute
if [ -z "${force}" ]; then
if [ -z "${pidfile}" ]; then
# Determine the pid by discovery
pidlist=`pidofproc "${1}"`
retval="${?}"
^^^^^^^^^^^^^^^^^^
needs to set pidfile here otherwise rm -f "${pidfile}"
fails below
rm -f anything
will never fail unless it is a directory or there are permission
problems.
-f, --force
ignore nonexistent files and arguments, never prompt
That isn't the point, the script is going to remove any file passed
to the function with the -p <filespec> argument.
It will also execute rm -f "" everytime it is run without passing -p
<filespec> and the daemon is not running as pidfile is always unset
without passing -p <filespec>
1)
# Program is not running, but an invalid pid file
exists
# remove the pid file and continue
rm -f "${pidfile}"
Maybe you don't care but I care about correctness.
Your distro, your rules.
Well I have hear that bed time story before.
So are you implying that you don't accept input from people
using/following/building LFS?
Should I only fix things and use them only on my system?
Or not to post and forward things to promote discussion?
I can do that.....
I was of the opinion that LFS was some what a community affair, maybe I
am wrong in thinking so?
--
http://lists.linuxfromscratch.org/listinfo/lfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page
Do not top post on this list.
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?
http://en.wikipedia.org/wiki/Posting_style