Find the answer to your Linux question:
Results 1 to 4 of 4
Is there a way to set the equv of "ifconfig eth0:0 192.168.10.12 netmask 255.255.255.0 broadcast 192.168.10.255" through /etc/rc.inet1.conf ??...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined! forgottentq's Avatar
    Join Date
    Jun 2006
    Location
    Virginia at the moment.
    Posts
    46

    rc.inet1.conf - multiple ips


    Is there a way to set the equv of "ifconfig eth0:0 192.168.10.12 netmask 255.255.255.0 broadcast 192.168.10.255" through /etc/rc.inet1.conf ??

  2. #2
    Linux Enthusiast
    Join Date
    Jun 2005
    Posts
    668
    Hi

    I believe this feature was added to rc.inet1.conf in 10.2

    anyway

    try this, I see that rc.inet1 does this:
    Code:
    ############################
    # DETERMINE INTERFACE LIST #
    ############################
    
    # Compose a list of interfaces from /etc/rc.d/rc.inet1.conf (with a maximum
    # of 6 interfaces, but you can easily enlarge the interface limit
    # - send me a picture of such a box :-).
    # If a value for IFNAME[n] is not set, we assume it is an eth'n' interface.
    # This way, the new script is compatible with older rc.inet1.conf files.
    # The IFNAME array will be used to determine which interfaces to bring up/down.
    MAXNICS=6
    i=0
    while [ $i -lt $MAXNICS ];
    do
      IFNAME[$i]=${IFNAME[$i]:=eth${i}}
      i=$(($i+1))
    done
    if [ "$DEBUG_ETH_UP" = "yes" ]; then
      echo "/etc/rc.d/rc.inet1:  List of interfaces: '${IFNAME[@]}'" | $LOGGER
    fi
    anyway, I believe in rc.inet1.conf if you set IFNAME too, you can specify the interface, you can try it at least.

    Code:
    # Config information for eth0:0
    IFNAME[7]="eth0:0"
    IPADDR[7]="192.168.0.100"
    NETMASK[7]="255.255.255.0"
    USE_DHCP[7]="no"
    DHCP_HOSTNAME[7]=""
    at the end of your /etc/rc.d/rc.inet1.conf

    I'm not sure it'll work but its worth an attempt.

  3. #3
    Just Joined! forgottentq's Avatar
    Join Date
    Jun 2006
    Location
    Virginia at the moment.
    Posts
    46
    nope that doesn't work kern... really good idea.. I really don't think there is a way.. Guess its just gonna have to be a shell script and a cron job .. thanx anway.

  4. $spacer_open
    $spacer_close
  5. #4
    Linux Enthusiast
    Join Date
    Jun 2005
    Posts
    668
    did you try a different number than 7? I just noticed $MAXNICS is 6

    *shrug*

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •