Re: /usr/local/etc/rc.conf & rcorder

From: Cyrille Lefevre (clefevre-lists_at_9online.fr)
Date: 05/31/04

  • Next message: Peter Schuller: "Re: config/kernel version mismatch after cvsup"
    To: "Nagilum" <freebsd@nagilum.org>, "Danny Braniss" <danny@cs.huji.ac.il>
    Date: Mon, 31 May 2004 15:54:26 +0200
    
    

    "Nagilum" <freebsd@nagilum.org> wrote:
    [snip]
    > I strongly support Patricks original proposal, as for the replies, this
    > would not interfere with your usual way of doing things, you could still
    > keep your ports startup options in /etc/rc.conf it would make no
    > difference. But give (optionally) a better separation of base and
    > ports. The settings may or may not be exported throught /usr/local/ to
    > other hosts, the decision would be up to the admin as changes to rc.conf
    > are (nearly) always made manually.
    > However while we're at it I also would like to propose the use of
    > rcorder for /usr/local/etc/rc.d/. There are certain ports that use
    > number prefixes to try to ensure proper startup order (e.g. mysql-client
    > or pkgtools, see the discussion prio the introduction of rcorder for why
    > this is suboptimal) however as we already have a working solution for
    > this problem it is only matter of using it, the required change would be
    > minimal:
    >
    > bash-2.05b# diff -Naur bash-2.05b# diff -Naur \
    > /usr/src/etc/rc.d/localdaemons /etc/rc.d/localdaemons
    > --- /usr/src/etc/rc.d/localdaemons Mon May 5 17:38:41 2003
    > +++ localdaemons Sat Nov 1 17:11:57 2003
    > @@ -29,7 +29,7 @@
    > fi
    > for dir in ${local_startup}; do
    > if [ -d "${dir}" ]; then
    > - for script in ${dir}/*.sh; do
    > + for script in `rcorder ${dir}/*.sh 2>/dev/null`; do
    > slist="${slist}${script_name_sep}${script}"
    > done
    >
    > fi
    >
    >
    > (Replace localdaemons with localpkg for newer system.)
    > There are certain ports (such as bacula) that would definatly profit
    > from this (e.g. all ports that require mysql/pgsql to be running, while
    > beeing started)

    there is still a problem, that is, mixing /etc/rc.d and /usr/local/etc/rc.d
    startup scripts whenever it is needed.

    for example, I use mimedefang, and instead of moving
    /usr/local/etc/rc.d/mimedefang.sh
    to /etc/rc.d, I restart sendmail after mimedefang has been started using a
    home made script in /usr/local/etc/rc.d.

    however, since not all local startup script have not been converted to rc.subr,
    it is not yet possible to do something like rcorder /etc/rc.d
    /usr/local/etc/rc.d
    from /etc/rc, but should be the target to be reached, IMHO.

    Cyrille Lefevre.

    -- 
    home: mailto:cyrille.lefevre@laposte.net
    _______________________________________________
    freebsd-current@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-current
    To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
    

  • Next message: Peter Schuller: "Re: config/kernel version mismatch after cvsup"

    Relevant Pages

    • Re: compat4x and compat5x
      ... I had to install both myself for an application we run on a server. ... That is the ports I used to install compat4x and compat5x. ... startup scripts aren't anywhere on my system. ...
      (freebsd-questions)
    • Re: Ports startup scripts in /etc/rc.d (Re: 5.2-BETA and related ports issues)
      ... > change the ports, but this is probably not the right fix. ... startup scripts to /etc/rc.d? ... postgresql starts before your mail system). ...
      (freebsd-current)
    • Re: compat4x and compat5x
      ... I had to install both myself for an application we run on a server. ... That is the ports I used to install compat4x and compat5x. ... startup scripts aren't anywhere on my system. ...
      (freebsd-questions)
    • RE: Courier-imap + Postfix problem
      ... There will likely be several startup scripts in there for other services. ... Use one as a skeleton to start up fam. ... Many ports will put the scripts there with a "-sample" ... rename it to remove the -sample and it'll start up on ...
      (freebsd-questions)