Ignore:
Timestamp:
01/27/2012 08:39:49 PM (13 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, 12.2, 12.2-rc1, 7.1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 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/loongarch-12.2, xry111/mips64el, xry111/multilib, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
Children:
bb75f17
Parents:
661b744
Message:

Update scripts to support BLFS bridge devices.
Cosmetic cleanups

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

Location:
bootscripts/lfs/lib/services
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • bootscripts/lfs/lib/services/init-functions

    r661b744 rbd899fb  
    6868WARNING_PREFIX="${WARNING} *** ${NORMAL}"
    6969
     70SUCCESS_SUFFIX="${BRACKET}[${SUCCESS}  OK  ${BRACKET}]${NORMAL}"
     71FAILURE_SUFFIX="${BRACKET}[${FAILURE} FAIL ${BRACKET}]${NORMAL}"
     72WARNING_SUFFIX="${BRACKET}[${WARNING} WARN ${BRACKET}]${NORMAL}"
     73
    7074BOOTLOG=/run/var/bootlog
    7175KILLDELAY=3
     
    568572{
    569573    echo -n -e "${BMPREFIX}${@}"
    570     echo -e "${CURS_ZERO}${SUCCESS_PREFIX}${SET_COL}${BRACKET}[${SUCCESS}  OK  ${BRACKET}]${NORMAL}"
     574    echo -e "${CURS_ZERO}${SUCCESS_PREFIX}${SET_COL}${SUCCESS_SUFFIX}"
    571575
    572576    # Strip non-printable characters from log file
     
    582586{
    583587    echo -n -e "${BMPREFIX}${@}"
    584     echo -e "${CURS_ZERO}${SUCCESS_PREFIX}${SET_COL}${BRACKET}[${SUCCESS}  OK  ${BRACKET}]${NORMAL}"
     588    echo -e "${CURS_ZERO}${SUCCESS_PREFIX}${SET_COL}${SUCCESS_SUFFIX}"
    585589
    586590    echo " OK" >> ${BOOTLOG}
     
    603607{
    604608    echo -n -e "${BMPREFIX}${@}"
    605     echo -e "${CURS_ZERO}${FAILURE_PREFIX}${SET_COL}${BRACKET}[${FAILURE} FAIL ${BRACKET}]${NORMAL}"
     609    echo -e "${CURS_ZERO}${FAILURE_PREFIX}${SET_COL}${FAILURE_SUFFIX}"
    606610
    607611    # Strip non-printable characters from log file
     
    617621{
    618622    echo -n -e "${BMPREFIX}${@}"
    619     echo -e "${CURS_ZERO}${FAILURE_PREFIX}${SET_COL}${BRACKET}[${FAILURE} FAIL ${BRACKET}]${NORMAL}"
     623    echo -e "${CURS_ZERO}${FAILURE_PREFIX}${SET_COL}${FAILURE_SUFFIX}"
    620624
    621625    echo "FAIL" >> ${BOOTLOG}
     
    636640{
    637641    echo -n -e "${BMPREFIX}${@}"
    638     echo -e "${CURS_ZERO}${WARNING_PREFIX}${SET_COL}${BRACKET}[${WARNING} WARN ${BRACKET}]${NORMAL}"
     642    echo -e "${CURS_ZERO}${WARNING_PREFIX}${SET_COL}${WARNING_SUFFIX}"
    639643
    640644    # Strip non-printable characters from log file
  • bootscripts/lfs/lib/services/ipv4-static

    r661b744 rbd899fb  
    4343case "${2}" in
    4444   up)
    45       if [ "$(ip addr show ${1} | grep ${IP})" == "" ]; then
    46          log_info_msg2 "\n" # Terminate the previous message
     45      if [ "$(ip addr show ${1} 2>/dev/null | grep ${IP})" == "" ]; then
     46         
     47         # Cosmetic output not needed for multiple services
     48         if ! $(echo ${SERVICE} | grep -q " "); then
     49           log_info_msg2 "\n" # Terminate the previous message
     50         fi
     51         
    4752         log_info_msg "Adding IPv4 address ${IP} to the ${1} interface..."
    4853         ip addr add ${args} dev ${1}
     
    6570
    6671   down)
    67       if [ "$(ip addr show ${1} | grep ${IP})" != "" ]; then
     72      if [ "$(ip addr show ${1} 2>/dev/null | grep ${IP})" != "" ]; then
    6873         log_info_msg "Removing IPv4 address ${IP} from the ${1} interface..."
    6974         ip addr del ${args} dev ${1}
     
    7378      if [ -n "${GATEWAY}" ]; then
    7479         # Only remove the gateway if ther are no remaining ipv4 addresses
    75          if [ "$(ip addr show ${1} | grep 'inet ')" != "" ]; then
     80         if [ "$(ip addr show ${1} 2>/dev/null | grep 'inet ')" != "" ]; then
    7681            log_info_msg "Removing default gateway..."
    7782            ip route del default
Note: See TracChangeset for help on using the changeset viewer.