Changeset b7804ae


Ignore:
Timestamp:
02/22/2015 09:50:39 PM (9 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, 7.7, 7.8, 7.9, 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/mips64el, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
Children:
9ee0e52a
Parents:
eb8b1c5
Message:

Cosmetic changes to output messages by network boot scripts.

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

Files:
8 edited

Legend:

Unmodified
Added
Removed
  • bootscripts/ChangeLog

    reb8b1c5 rb7804ae  
     12015-02-22 Bruce Dubbs <bdubbs@linuxfromscratch.org>
     2   * Cosmetic changes to network scripts' output
     3
    142015-02-08 Bruce Dubbs <bdubbs@linuxfromscratch.org>
    25   * Modify ipv4-static to support ethernet labels
  • bootscripts/lfs/lib/services/init-functions

    reb8b1c5 rb7804ae  
    2424export PATH="/bin:/usr/bin:/sbin:/usr/sbin"
    2525
    26 ## Screen Dimensions
    27 # Find current screen size
    28 if [ -z "${COLUMNS}" ]; then
    29    COLUMNS=$(stty size)
    30    COLUMNS=${COLUMNS##* }
    31 fi
    32 
    33 # When using remote connections, such as a serial port, stty size returns 0
    34 if [ "${COLUMNS}" = "0" ]; then
    35    COLUMNS=80
    36 fi
    37 
    38 ## Measurements for positioning result messages
    39 COL=$((${COLUMNS} - 8))
    40 WCOL=$((${COL} - 2))
    41 
    42 ## Set Cursor Position Commands, used via echo
    43 SET_COL="\\033[${COL}G"      # at the $COL char
    44 SET_WCOL="\\033[${WCOL}G"    # at the $WCOL char
    45 CURS_UP="\\033[1A\\033[0G"   # Up one line, at the 0'th char
    46 CURS_ZERO="\\033[0G"
    47 
    4826## Set color commands, used via echo
    4927# Please consult `man console_codes for more information
     
    6745FAILURE_PREFIX="${FAILURE}*****${NORMAL}"
    6846WARNING_PREFIX="${WARNING} *** ${NORMAL}"
     47SKIP_PREFIX="${INFO}  S  ${NORMAL}"
    6948
    7049SUCCESS_SUFFIX="${BRACKET}[${SUCCESS}  OK  ${BRACKET}]${NORMAL}"
    7150FAILURE_SUFFIX="${BRACKET}[${FAILURE} FAIL ${BRACKET}]${NORMAL}"
    7251WARNING_SUFFIX="${BRACKET}[${WARNING} WARN ${BRACKET}]${NORMAL}"
     52SKIP_SUFFIX="${BRACKET}[${INFO} SKIP ${BRACKET}]${NORMAL}"
    7353
    7454BOOTLOG=/run/bootlog
     
    7757# Set any user specified environment variables e.g. HEADLESS
    7858[ -r /etc/sysconfig/rc.site ]  && . /etc/sysconfig/rc.site
     59
     60## Screen Dimensions
     61# Find current screen size
     62if [ -z "${COLUMNS}" ]; then
     63   COLUMNS=$(stty size)
     64   COLUMNS=${COLUMNS##* }
     65fi
     66
     67# When using remote connections, such as a serial port, stty size returns 0
     68if [ "${COLUMNS}" = "0" ]; then
     69   COLUMNS=80
     70fi
     71
     72## Measurements for positioning result messages
     73COL=$((${COLUMNS} - 8))
     74WCOL=$((${COL} - 2))
     75
     76## Set Cursor Position Commands, used via echo
     77SET_COL="\\033[${COL}G"      # at the $COL char
     78SET_WCOL="\\033[${WCOL}G"    # at the $WCOL char
     79CURS_UP="\\033[1A\\033[0G"   # Up one line, at the 0'th char
     80CURS_ZERO="\\033[0G"
    7981
    8082################################################################################
     
    646648}
    647649
     650log_skip_msg()
     651{
     652    /bin/echo -n -e "${BMPREFIX}${@}"
     653    /bin/echo -e "${CURS_ZERO}${SKIP_PREFIX}${SET_COL}${SKIP_SUFFIX}"
     654
     655    # Strip non-printable characters from log file
     656    logmessage=`echo "${@}" | sed 's/\\\033[^a-zA-Z]*.//g'`
     657    /bin/echo "SKIP" >> ${BOOTLOG}
     658   
     659    return 0
     660}
     661
    648662################################################################################
    649663# log_info_msg()                                                               #
  • bootscripts/lfs/lib/services/ipv4-static

    reb8b1c5 rb7804ae  
    4949      if [ "$(ip addr show ${1} 2>/dev/null | grep ${IP}/)" = "" ]; then
    5050         
    51          # Cosmetic output not needed for multiple services
     51         # Cosmetic output
    5252         if ! $(echo ${SERVICE} | grep -q " "); then
    5353           log_info_msg2 "\n" # Terminate the previous message
  • bootscripts/lfs/sbin/ifup

    reb8b1c5 rb7804ae  
    99# Update      : Bruce Dubbs - bdubbs@linuxfromscratch.org
    1010#
    11 # Version     : LFS 7.2
     11# Version     : LFS 7.7
    1212#
    1313# Notes       : The IFCONFIG variable is passed to the SERVICE script
     
    3434}
    3535
    36 RELEASE="7.2"
     36RELEASE="7.7"
    3737
    3838USAGE="Usage: $0 [ -hV ] [--help] [--version] interface"
     
    9090# is not set to yes
    9191if [ "${IN_BOOT}" = "1" -a "${ONBOOT}" != "yes" ]; then
    92    log_info_msg2 "skipped"
    93    echo
     92   log_skip_msg
    9493   exit 0
    9594fi
     
    104103  fi
    105104done
     105
     106if [ "${SERVICE}" = "wpa" ]; then log_success_msg; fi
    106107
    107108# Create/configure the interface
     
    127128if [ -n "${GATEWAY}" ]; then
    128129   if ip route | grep -q default; then
    129       log_warning_msg "\nGateway already setup; skipping."
     130      log_skip_msg "\n     Gateway already setup; skipping."
    130131   else
    131132      log_info_msg "Setting up default gateway..."
  • bootscripts/lfs/sysconfig/rc.site

    reb8b1c5 rb7804ae  
    3232#FAILURE_PREFIX="${FAILURE}*****${NORMAL}"
    3333#WARNING_PREFIX="${WARNING} *** ${NORMAL}"
     34
     35# Manually seet the right edge of message output (characters)
     36# Useful when resetting console font during boot to override
     37# automatic screen width detection
     38#COLUMNS=120
    3439
    3540# Interactive startup
  • chapter01/changelog.xml

    reb8b1c5 rb7804ae  
    3737-->
    3838    <listitem>
     39      <para>2015-02-22</para>
     40      <itemizedlist>
     41        <listitem>
     42          <para>[bdubbs] - Cosmetic changes to output messages
     43          by network boot scripts.</para>
     44        </listitem>
     45      </itemizedlist>
     46    </listitem>
     47
     48    <listitem>
    3949      <para>2015-02-19</para>
    4050      <itemizedlist>
  • general.ent

    reb8b1c5 rb7804ae  
    1 <!ENTITY version         "SVN-20150219">
     1<!ENTITY version         "SVN-20150222">
    22<!ENTITY short-version   "svn">  <!-- Used in dbus chapter, change to x.y for release
    33                                      but not -rc releases -->
    4 <!ENTITY releasedate     "February 19, 2015">
     4<!ENTITY releasedate     "February 22, 2015">
    55<!ENTITY copyrightdate   "1999-2015"><!-- jhalfs needs a literal dash, not &ndash; -->
    66<!ENTITY milestone       "7.7">
  • packages.ent

    reb8b1c5 rb7804ae  
    353353<!ENTITY less-ch6-sbu "0.1 SBU">
    354354
    355 <!ENTITY lfs-bootscripts-version "20150208">              <!-- Scripts depend on this format -->
     355<!ENTITY lfs-bootscripts-version "20150222">              <!-- Scripts depend on this format -->
    356356<!ENTITY lfs-bootscripts-size "BOOTSCRIPTS-SIZE KB">         <!-- Updated in Makefile -->
    357357<!ENTITY lfs-bootscripts-url "&downloads-root;lfs-bootscripts-&lfs-bootscripts-version;.tar.bz2">
Note: See TracChangeset for help on using the changeset viewer.