Ignore:
Timestamp:
06/02/2019 11:21:32 AM (5 years ago)
Author:
Thomas Trepl <thomas@…>
Branches:
multilib-10.1
Children:
d8a8713
Parents:
4a8482f
Message:

Merge changes from trunk

git-svn-id: http://svn.linuxfromscratch.org/LFS/branches/multilib@11611 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bootscripts/lfs/sbin/ifup

    r4a8482f r530d929  
    88#               Kevin P. Fleming - kpfleming@linuxfromscratch.org
    99# Update      : Bruce Dubbs - bdubbs@linuxfromscratch.org
     10#               DJ Lucas - dj@linuxfromscratch.org
    1011#
    1112# Version     : LFS 7.7
     
    1920up()
    2021{
     22  log_info_msg "Bringing up the ${1} interface..."
     23
    2124  if ip link show $1 > /dev/null 2>&1; then
    2225     link_status=`ip link show $1`
     
    2932
    3033  else
    31      log_failure_msg "\nInterface ${IFACE} doesn't exist."
     34     log_failure_msg "Interface ${IFACE} doesn't exist."
    3235     exit 1
    3336  fi
     37
     38  evaluate_retval
    3439}
    3540
     
    7378. /lib/lsb/init-functions
    7479
    75 log_info_msg "Bringing up the ${1} interface... "
    76 
    7780if [ ! -r "${file}" ]; then
    78    log_failure_msg2 "${file} is missing or cannot be accessed."
     81   log_failure_msg "Unable to bring up ${1} interface! ${file} is missing or cannot be accessed."
    7982   exit 1
    8083fi
    8184
    82 . $file
     85.  $file
    8386
    8487if [ "$IFACE" = "" ]; then
    85    log_failure_msg2 "${file} does not define an interface [IFACE]."
     88   log_failure_msg "Unable to bring up ${1} interface! ${file} does not define an interface [IFACE]."
    8689   exit 1
    8790fi
     
    9093# is not set to yes
    9194if [ "${IN_BOOT}" = "1" -a "${ONBOOT}" != "yes" ]; then
    92    log_skip_msg
    9395   exit 0
     96fi
     97
     98# Bring up the interface
     99if [ "$VIRTINT" != "yes" ]; then
     100   up ${IFACE}
    94101fi
    95102
     
    111118done
    112119
    113 # Bring up the interface and any components
    114 for I in $IFACE $INTERFACE_COMPONENTS; do up $I; done
     120# Set link up virtual interfaces
     121if [ "${VIRTINT}" == "yes" ]; then
     122   up ${IFACE}
     123fi
     124
     125# Bring up any additional interface components
     126for I in $INTERFACE_COMPONENTS; do up $I; done
    115127
    116128# Set MTU if requested. Check if MTU has a "good" value.
     
    128140if [ -n "${GATEWAY}" ]; then
    129141   if ip route | grep -q default; then
    130       log_skip_msg "\n     Gateway already setup; skipping."
     142      log_warning_msg "Gateway already setup; skipping."
    131143   else
    132       log_info_msg "Setting up default gateway..."
     144      log_info_msg "Adding default gateway ${GATEWAY} to the ${IFACE} interface..."
    133145      ip route add default via ${GATEWAY} dev ${IFACE}
    134146      evaluate_retval
Note: See TracChangeset for help on using the changeset viewer.