"compatibility" links and SIGHUP for cupsd

Johannes Meixner <[email protected]> Mon, 31 Jan 2005 15:55:19 +0100 (CET)
Newsgroups gmane.linux.drivers.hpofficejet.devel
Message-ID <[email protected]>
Hello,

using HPLIP 0.8.7:


I)
It seems there are some ugly "compatibility" links needed:


1.)
According to the Filesystem Hierarchy Standard (FHS)
"/usr is shareable, read-only data", see
http://www.pathname.com/fhs/pub/fhs-2.3.html#THEUSRHIERARCHY

Therefore links from config files like
  /etc/hp/hplip.conf -> /usr/share/hplip/hplip.conf
are not allowed according to FHS because the admin should
be able to change them without the need to re-mount /usr/
if he has mounted it read-only.

At the moment I move the config file
  mv /usr/share/hplip/hplip.conf /etc/hp/hplip.conf
but because HP's "make install" creates links,
it seems that something in HP's software expects it
in /usr/share/hplip/.

Therefore to be safe I added a link
  /usr/share/hplip/hplip.conf -> /etc/hp/hplip.conf
but I don't like such "compatibility" links because very soon
some tools or documentation or users rely on such links and
you will never ever get rid of them.
I would prefer when the config file is only expected in /etc/hp/.


2.)
The same problem exists for the init script.
HP's "make install" creates a link
  /etc/init.d/hplip -> /usr/share/hplip/hplip.sh
which is not wrong according to FHS because the init script
is not supposed to be changed by the admin.
Nevertheless it looks not nice and again I move it
  mv /usr/share/hplip/hplip.sh /etc/init.d/hplip
and to be safe I must add a "compatibility" link
  /usr/share/hplip/hplip.sh -> /etc/init.d/hplip
I would prefer to have it only under /etc/init.d/.


3.)
The same problem exists for the "toolbox" script.
HP's "make install" installs it under /usr/share/hplip/toolbox
but /usr/share/hplip/ is not in a normal usre's PATH.
Therefore I create a third "compatibility" link
  /usr/bin/toolbox -> /usr/share/hplip/toolbox
Why is the "toolbox" script not installed into /usr/bin/?



II)
SIGHUP kills cupsd if it doesn't run as root.

In /etc/init.d/hplip there is "killall -HUP cupsd".
If cupsd doesn't run as root, the SIGHUP will terminate it, see
http://portal.suse.com/sdb/en/2003/09/jsmeix_print-einrichten-90.html

Therefore I exchange it with "sed -i -e" as follows:
's/killall -HUP cupsd/echo "Note: You may have to restart the cupsd."/'

I have a bad feeling when an init script automatically
triggers other services to be reloaded or even re-started.
I think a message to the admin is sufficient and safe.



Kind Regards,
Johannes Meixner
-- 
SUSE LINUX Products GmbH, Maxfeldstrasse 5      Mail: [email protected]
90409 Nuernberg, Germany                    WWW: http://www.suse.de/


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl