rc.d/ldconfig change

From: M. Warner Losh (imp_at_bsdimp.com)
Date: 08/26/05

  • Next message: m.ehinger_at_ltur.de: "Re: Parking disk drive heads"
    Date: Fri, 26 Aug 2005 15:20:41 -0600 (MDT)
    To: hackers@FreeBSD.org
    
    

    In the embedded system that I'm working on, I've discovered a minor
    problem with the /etc/rc.d/ldconfig script. It assumes that you have
    a /usr/lib/aout directory. While this is true by default, I believe
    it would be better if the ldconfig script didn't assume this and
    actually tested for its existance before trying to run ldconfig -aout
    on it. This would allow those users who do not want any aout support
    in their system to eliminate it completely w/o it generating
    warnings. To that end, I've worked up this patch that I'd like to
    commit and MFC after it has settled a bit. What do people here think?
    Since the patch is short, I'm including it inline.

    Warner

    Index: ldconfig
    ===================================================================
    RCS file: /cache/ncvs/src/etc/rc.d/ldconfig,v
    retrieving revision 1.14
    diff -u -r1.14 ldconfig
    --- ldconfig 16 Jan 2005 08:34:30 -0000 1.14
    +++ ldconfig 26 Aug 2005 21:17:13 -0000
    @@ -35,14 +35,16 @@
                     i386)
                             # Default the a.out ldconfig path.
                             : ${ldconfig_paths_aout=${ldconfig_paths}}
    - _LDC=/usr/lib/aout
    - for i in ${ldconfig_paths_aout} /etc/ld.so.conf; do
    + _LDC=
    + for i in /usr/lib/aout ${ldconfig_paths_aout} /etc/ld.so.conf; do
                                     if [ -r "${i}" ]; then
                                             _LDC="${_LDC} ${i}"
                                     fi
                             done
    - echo 'a.out ldconfig path:' ${_LDC}
    - ${ldconfig} -aout ${_ins} ${_LDC}
    + if [ -n ${_LDC} ]; then
    + echo 'a.out ldconfig path:' ${_LDC}
    + ${ldconfig} -aout ${_ins} ${_LDC}
    + fi
                             ;;
                     esac
             fi
    _______________________________________________
    freebsd-hackers@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-hackers
    To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"


  • Next message: m.ehinger_at_ltur.de: "Re: Parking disk drive heads"

    Relevant Pages

    • mysql50-server not starting correctly on FreeBSD 6.1-PRERELEASE (ldconfig, rcorder)
      ... I installed mysql50-server from an up-to-date ports tree on a new server I'm ... setting up running FreeBSD 6.1. ... ldconfig, but the startup script does not require ldconfig. ...
      (freebsd-stable)
    • Re: Setting Env
      ... man ldconfig for more info... ... Subject: Setting Env ... But then how do I call that script? ... Get more on shows you hate to love ...
      (freebsd-questions)
    • How to make hotplug work
      ... I want to make my small embedded system work with hotplug, ... I have my inittab to start /etc/rc.d/rcS script., ... I boot this embedded system without initrd, ...
      (Fedora)
    • Re: Printing variable names
      ... This is in a script that I use to test an embedded system through the comport. ... I call the script with the command number, ... > Mike wrote: ...
      (comp.lang.python)
    • Re: [opensuse] A Smart Question
      ... Depends on whether the packager of the rpm included the script to run ... SuSEconfig;ldconfig ... after update/installation via smart. ...
      (SuSE)