Re: ce0 is primary over hme0, how do I switch?

From: Stefaan A Eeckels (tengo_at_DELETEMEecc.lu)
Date: 09/24/04

  • Next message: Martin Paul: "Re: "Refreshing" Solaris Jumpstart Server"
    Date: Fri, 24 Sep 2004 08:55:37 +0200
    
    

    On 23 Sep 2004 16:38:36 -0700
    ppacheco@sbcglobal.net (Phillip Pacheco) wrote:

    > Why is ce0 considered the primary, and how do I change that? I

    That's because the "init.d/network" startup script reads the
    /etc/hostname.* files in alphabetical order:

    | # If there are multiple lines we assume the file contains a list of commands to
    | # ifconfig with neither the implied bringing up of the interface nor the setting
    | # of the default netmask and broadcast address.
    | #
    | interface_names="`echo /etc/hostname.*[0-9] 2>/dev/null`"
    | if [ "$interface_names" != "/etc/hostname.*[0-9]" ]; then
    | (
    | #
    | # If /etc/hostname.lo0 exists the loop below will do
    | # additional configuration of lo0.
    | #
    | echo "configuring IPv4 interfaces:\c"
    | ORIGIFS="$IFS"
    | IFS="$IFS."
    | set -- $interface_names
    | IFS="$ORIGIFS"
    | while [ $# -ge 2 ]; do
    | shift
    | if [ "$1" = "ip" -o "$1" = "ip6" ]; then
    | #
    | # Filenames of the form /etc/hostname.ip.* and
    | # /etc/hostname.ip6.* represent tunneling interfaces
    | # (see tun(7M)); these are handled later by
    | # /etc/init.d/inetinit.
    | #
    | shift
    | while [ $# -gt 1 -a "$1" != "/etc/hostname" ]; do
    | shift
    | done
    | continue
    | fi
    | if [ "$1" = "xx0" ]; then
    | #
    | # For some unknown historical reason the xx0
    | # ifname is ignored.
    | #
    | shift
    | continue
    | fi
    | /sbin/ifconfig $1 plumb

    etc.

    > manually added a route to the logserver, but the client called that a
    > workaround, and wants hme0 to be considered the primary interface.
    > Yes, we have also considered setting up a management network, as
    > separate from production, but we are not in a position to do that
    > right now.

    The solution is to modify the loop so that hme0 is plumbed first.

    ifh="`echo /etc/hostname.h*[0-9] 2>/dev/null`"
    ifc="`echo /etc/hostname.c*[0-9] 2>/dev/null`"
    [ "$ifh" != "/etc/hostname.h*[0-9]" ] && interface_names = "$ifh"
    [ "$ifc" != "/etc/hostname.c*[0-9]" ] && interface_names = "$interface_names $ifh"

    if [ ! -z "$interface_names ]; then
    (
        #
        # If /etc/hostname.lo0 exists the loop below will do
        # additional configuration of lo0.

    etc.

    Note that a modified startup file will be silently set back
    to the default if you upgrade the OS.

    Take care,

    -- 
    Stefaan
    -- 
    "What is stated clearly conceives easily."  -- Inspired sales droid
    

  • Next message: Martin Paul: "Re: "Refreshing" Solaris Jumpstart Server"

    Relevant Pages

    • Software deployment under computer configuration
      ... I have deployed software using the Group Policy (MSI package) in the past. ... we are using a msp package using the startup script ... My question is since it is configured under the computer configuration ... does the whole install process take place before the user ...
      (microsoft.public.windows.server.active_directory)
    • Re: startup script
      ... Startup scripts can only be applied via computer configuration and the computer you ... want it to apply to must be within the scope on influence of the policy either ... into that folder, then select add/browse to configure it as a startup script. ...
      (microsoft.public.win2000.group_policy)
    • Machine Based GP Processing order
      ... configuration. ... GP1 contains a startup script to unistall Office XP Pro. ... were licensed for Standard and our installation was done unmanaged so I am ... GP2 contains a Assigned Office XP Std installation and this will be a ...
      (microsoft.public.win2000.group_policy)
    • package purging and app configuration
      ... I installed a dict front end (ding) and somehow inadvertently ... startup script how to correct that, and so decided simply to reinstall ... and then did a new installation. ... original configuration files are deleted? ...
      (Debian-User)