Ignore:
Timestamp:
05/24/2019 07:06:18 PM (5 years ago)
Author:
Bruce Dubbs <bdubbs@…>
Branches:
10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
Children:
e8c6e1f
Parents:
6b54807
Message:

Cosmetic changes to LFS bootscripts.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@11610 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

File:
1 edited

Legend:

Unmodified
Added
Removed
  • bootscripts/lfs/sbin/ifup

    r6b54807 r890ef7c  
    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.