Re: rc.d and ports

From: Oliver Eikemeier (eikemeier_at_fillmore-labs.com)
Date: 02/23/04

  • Next message: Garance A Drosihn: "HEADSUP: Commits Planned for 64-bit time_t on sparc64"
    Date: Mon, 23 Feb 2004 11:46:23 +0100
    To: Mike Makonnen <mtm@identd.net>
    
    

    Mike Makonnen wrote:

    > Hi,
    >
    > A lot of people have been calling to have ports startup scripts
    > integrated into rc.d. I have finally gotten arround to doing it.
    > Attached are the rc.d patches to make it work, but
    > I will need some cooperation from the ports folks.
    See PR 56736, there since Sep 2003:
      <http://www.freebsd.org/cgi/query-pr.cgi?pr=conf/56736>

    If you don't like it, please provide feedback what you think can be improved.

    > Essentialy the rc.d patches will recognize a ports script and source
    > the appropriate configuration files. From the user's point of view
    > there will be two major differences:
    > 1. No more fooport.sh-sample files that must be renamed to enable the port
    > 2. Ports can be configured from /etc/rc.conf (or /usr/local/etc/rc.conf).
    Except the /usr/local/etc/rc.conf this is what a lot of ports already do.

    > To make this work here's what's needed from the ports makefiles.
    > This is just a general sketch of what needs to be done. The
    > ports folks can do this however they deem appropriate.
    >
    > The makefile for the port should define a variable:
    >
    > RCVAR_NAME="fooport_enable"
    >
    > Then, logic similar to this should be inserted in the appropriate
    > bsd.port* makefile:
    >
    > if ! grep 1>/dev/null "\$${RCVAR_NAME}=" ${PREFIX}/etc/defaults/rc.conf ; then
    > echo "${RCVAR_NAME}=NO" >> ${PREFIX}/etc/defaults/rc.conf
    > fi
    I guess we don't need this (and shouldn't do it, since ${PREFIX}/etc/defaults/rc.conf
    might be read-only). Defaulting xxx_enable to "NO" seems to be sufficient, with

      [ -z "$xxx_enable" ] && xxx_enable="NO"
    or
      xxx_enable=${xxx_enable:-"NO"}
    before calling load_rc_config $name

    > [...]
    >
    > I know from cursory glances at -current mail that people are divided
    > on whether to have /usr/local/etc/{rc.conf,rc.conf.d} or to support
    > only /etc/rc.conf. Both will be supported. It's the user's choice
    > whether he wants every thing in /etc/rc.conf or /usr/local/etc/rc.conf.
    > However, a /usr/local/etc/defaults/rc.conf is needed because that is where
    > the default values for ports config knobs will be kept and because they
    > should be kept separately from base system knobs.
    Adding /usr/local/etc/rc.conf maybe a good idea, but I don't see the need
    for a /usr/local/etc/defaults/rc.conf.

    > Comments/Corrections solicited.
    See above. If I get feedback I well incorporate /usr/local/etc/defaults/rc.conf
    support in PR 56736.

    Regards
        Oliver
    _______________________________________________
    freebsd-arch@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-arch
    To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"


  • Next message: Garance A Drosihn: "HEADSUP: Commits Planned for 64-bit time_t on sparc64"

    Relevant Pages

    • Re: Net Meeting Help Please
      ... > I suspect the firewall in my router is blocking the ports needed for ... BTW - were you calling him? ... > To establish outbound NetMeeting connections through a firewall, ... & thus to *Receive* Incoming NetMeeting Calls, ...
      (uk.people.silversurfers)
    • Why is WCESCOMM listening on all these TCP/IP ports?
      ... I notice that WCESCOMM is listening on all the ports between 3000 and ... Who is it expecting to come calling? ...
      (microsoft.public.pocketpc.activesync)
    • Re: Child domain in a DMZ can not authenticate to another child domain
      ... are open between domain controllers but not between the machine in question ... Why have a firewall if you open ports between your networks? ... Calling an illegal alien an "undocumented worker" is like calling a ...
      (microsoft.public.windows.server.active_directory)
    • Re: Dual NIC on lan + WAN Nic
      ... What is the best method of configuring two NIC ports to the LAN to speed up ... Calling an illegal alien an "undocumented worker" is like calling a ...
      (microsoft.public.windows.server.sbs)
    • Problems with kdevelop3
      ... I recently built kdevelop3 from the ports tree, and it has been, to say the ... kdevelop specific configuration files from my home directory. ...
      (freebsd-questions)