Re: Starting a second loopback interface and services at startup

From: Robert Lowe (Robert.H.Lowe_at_lawrence.edu)
Date: 05/28/04

  • Next message: Mugwumba From the North: "New FreeBSD Installation"
    Date: Fri, 28 May 2004 13:48:26 -0500
    To: freebsd-questions@freebsd.org
    
    

    Robert Lowe wrote:

    > Hi!
    >
    > New to FreeBSD and running 5.2.1-RELEASE on an Alpha. I do predominantly
    > SysV/ATT boxes, so I feel a bit out of it...
    >
    > Question #1:
    > I need to create a second loopback interface, which I can do just fine
    > at the command line:
    >
    > # ifconfig lo1 create
    > # ifconfig lo1 inet a.b.c.d netmask x.x.x.x
    >
    > How do I automate this at startup? I stumbled across something in
    > /etc/network.subr that suggests I ought to create /etc/start_if.lo1
    > which would then be sourced. I assume I can add a ifconfig_lo1
    > variable to /etc/rc.conf. I tried these, but with no luck. Can
    > anyone point the way?

    I figured out the correct way to do this:

    1. Override the default network_interfaces variable in
        /etc/defaults/rc.conf in /etc/rc.conf. This is a space-separated
        list of interfaces to start. I included the new loopback interface
        to create.
    2. Create a /etc/start_if.<if-name> script to create the interface.
    3. Add a ifconfig_<if> variable to rc.conf as well. I had this already,
        so I did not have to do anything.

    The reason the last two steps did nothing before was the list of
    interfaces in the netif script is generated using 'ifconfig -l',
    which of course does not include interfaces which haven't yet been
    created, and so the start_if.<if-name> script is not run.

    > Question #2:
    > I'm trying to start Quagga services on this box (zebra and ospfd).
    > I added scripts to /usr/local/etc/rc.d/ for these two, but no luck.
    > They work fine from the command line, e.g.
    >
    > # /usr/local/etc/rc.d/zebra.sh start
    > # /usr/local/etc/rc.d/ospfd.sh start
    >
    > Both have the .sh extension, which seems to be required. How should
    > I troubleshoot this? I don't find anything in dmesg.today suggesting
    > that there was even an attempt to run the scripts. Also, can one use
    > the rcorder keywords to provide startup ordering for scripts in
    > /usr/local/etc/rc.d ???

    The scripts now run properly, but in the wrong order, so I still need
    an answer here. They seem to execute in alpha-numeric order. I suppose
    I could start them in one script, but that's not really the answer. Help!
    I suppose I could use the Snn<name> SysV approach. ;-)

    -Robert

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


  • Next message: Mugwumba From the North: "New FreeBSD Installation"

    Relevant Pages

    • Re: IPS-Builder
      ... I' d like to share with all, this script made by me based on root0 ... You need 3 network interfaces (One for management and two for the bridge) ... -This have a management interface. ...
      (Focus-IDS)
    • [PATCH] kill spurious MAKDEV scripts
      ... This driver automatically probes for most IDE interfaces (including all PCI ... -Use the MAKEDEV.snd script located in the directory named scripts ... echo " done" ... chown $OWNER $1$tmp1 ...
      (Linux-Kernel)
    • Re: VIM: deleteline() function
      ... normal mode and script API ... command-line driven editor. ... are available in both interfaces. ... deleting text by first visually selecting it is covered in those ...
      (comp.editors)
    • IPS-Builder
      ... I' d like to share with all, this script made by me based on root0 ... You need 3 network interfaces (One for management and two for the bridge) ... -This have a management interface. ...
      (Focus-IDS)