Menu

#6 [UN]INSTALL script SysV init links invalid on some distros

closed-fixed
nobody
None
5
2009-02-19
2009-02-19
Anonymous
No

Hi.

I'm really liking collectl in place of sadc on my systems. It's great for poring over historic details when something triggered a monitoring alarm and I wasn't just sitting around twiddling my thumbs and waiting to catch it. :) It's also really cool that the stats can be correlated in so many useful ways! Thanks for a great tool.

Anyway, attached is a simple patch to fix a few snags I hit while installing on some Debian boxen. Meant to send this a while ago but just got around to it.

* It looks like the INSTALL script puts the initscripts into /opt/hp/collectl/initd/ by default but creates symlinks from /etc/init.d/collectl to files in /opt/hp/collectl/etc/init.d/, which doesn't exist.

* The UNINSTALL script does not remove the links created by the update-rc.d command contained in INSTALL because Debian doesn't have linkage between /etc/init.d/rc?.d/ and /etc/rc?.d/ like RedHat does.

* Debian and derived systems should have an /etc/debian_version file, something akin to RedHat's /etc/redhat-release, which should be a good indicator of distribution.

Thanks
-R

Discussion

  • Nobody/Anonymous

    INSTALL/UNINSTALL fixes for Debian

     
  • Rich Henning

    Rich Henning - 2009-02-19

    Woops, got logged out due to inactivity. Submission came from me.
    -R

     
  • Mark Seger

    Mark Seger - 2009-02-19
    • status: open --> open-fixed
     
  • Mark Seger

    Mark Seger - 2009-02-19

    Thanks for the bug report. Two of these had actually been recently reported by an internal debian user and I have made 'almost' the same changes to INSTALL as in your patch for SuSE and Debian, but did indeed miss the one in the UNINSTALL as well. I think when you generated this you entered the file names in the wrong order because it shows:

    - ln -sf $BINDIR/etc/init.d/collectl-debian /etc/init.d/coll
    + ln -sf $BINDIR/initd/collectl-debian /etc/init.d/collectl

    and it was the '+' line that was wrong and the '-' one that's correct. At least that's what I have in my new INSTALL script which has executed correctly.

    So this will indeed be fixed in the next release. I suspect as usage on other distros get more exercise there will be more of these little glitches that pop up. So far the only distro-dependent problems have been with the installation.

    Again, thanks...

    -mark

     
  • Mark Seger

    Mark Seger - 2009-02-19

    On closed inspection I was the one who was confused. While I did indeed fix this I didn't do it the way you did. The bug was that I was putting scripst into $BINDIR/etc/initd and so you changes the links to correctly point to that directory. However, the fix was for me to put the scripts into $BINDIR/etc/init.d, since that's where the rpm puts them and I wanted both methods to install in the same place.

    sorry for doubting you ;-

    -mark

     
  • Rich Henning

    Rich Henning - 2009-02-19

    No sweat. Works for me & thanks for the update.

     
  • Mark Seger

    Mark Seger - 2009-02-19
    • status: open-fixed --> closed-fixed