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


  -- Bruce
--
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

Reply via email to