Changeset b9908a1a


Ignore:
Timestamp:
07/06/2024 10:30:09 PM (2 months ago)
Author:
Thomas Trepl <thomas@…>
Branches:
multilib
Children:
38c03e1
Parents:
7a0aa45 (diff), e7b6af1 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Automatic merge of trunk into multilib

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • bootscripts/ChangeLog

    r7a0aa45 rb9908a1a  
     12024-07-06 Bruce Dubbs <bdubbs@linuxfromscratch.org>
     2   * Add logic to init-functions to only print escape sequences
     3          if stdin and stdout are connected to a terminal.
     4
    152024-04-16 Bruce Dubbs <bdubbs@linuxfromscratch.org>
    26   * Remove blank output line generated in ifup script when bringing
  • bootscripts/lfs/lib/services/init-functions

    r7a0aa45 rb9908a1a  
    5959[ -r /etc/sysconfig/rc.site ]  && . /etc/sysconfig/rc.site
    6060
    61 ## Screen Dimensions
    62 # Find current screen size
    63 if [ -z "${COLUMNS}" ]; then
    64    COLUMNS=$(stty size)
    65    COLUMNS=${COLUMNS##* }
     61# If HEADLESS is set, use that. 
     62# If file descriptor 1 or 2 (stdout and stderr) is not open or
     63# does not refer to a terminal, consider the script headless.
     64[ ! -t 1 -o ! -t 2 ] && HEADLESS=${HEADLESS:-yes}
     65
     66if [ "x$HEADLESS" != "xyes" ]
     67then
     68  ## Screen Dimensions
     69  # Find current screen size
     70  if [ -z "${COLUMNS}" ]; then
     71    COLUMNS=$(stty size)
     72    COLUMNS=${COLUMNS##* }
     73  fi
     74else
     75   COLUMNS=80
    6676fi
    6777
     
    576586log_success_msg()
    577587{
    578     /bin/echo -n -e "${BMPREFIX}${@}"
    579     /bin/echo -e "${CURS_ZERO}${SUCCESS_PREFIX}${SET_COL}${SUCCESS_SUFFIX}"
    580 
     588    if [ "x$HEADLESS" != "xyes" ]
     589    then
     590      /bin/echo -n -e "${BMPREFIX}${@}"
     591      /bin/echo -e "${CURS_ZERO}${SUCCESS_PREFIX}${SET_COL}${SUCCESS_SUFFIX}"
     592    else
     593      logmessage=`echo "${@}" | sed 's/\\\033[^a-zA-Z]*.//g'`
     594      /bin/echo -e "${logmessage} OK"
     595    fi
    581596    # Strip non-printable characters from log file
    582597    logmessage=`echo "${@}" | sed 's/\\\033[^a-zA-Z]*.//g'`
     
    590605log_success_msg2()
    591606{
    592     /bin/echo -n -e "${BMPREFIX}${@}"
    593     /bin/echo -e "${CURS_ZERO}${SUCCESS_PREFIX}${SET_COL}${SUCCESS_SUFFIX}"
     607    if [ "x$HEADLESS" != "xyes" ]
     608    then
     609      /bin/echo -n -e "${BMPREFIX}${@}"
     610      /bin/echo -e "${CURS_ZERO}${SUCCESS_PREFIX}${SET_COL}${SUCCESS_SUFFIX}"
     611    else
     612      echo " OK"
     613    fi
    594614
    595615    echo " OK" >> ${BOOTLOG}
     
    611631log_failure_msg()
    612632{
    613     /bin/echo -n -e "${BMPREFIX}${@}"
    614     /bin/echo -e "${CURS_ZERO}${FAILURE_PREFIX}${SET_COL}${FAILURE_SUFFIX}"
     633    if [ "x$HEADLESS" != "xyes" ]
     634    then
     635      /bin/echo -n -e "${BMPREFIX}${@}"
     636      /bin/echo -e "${CURS_ZERO}${FAILURE_PREFIX}${SET_COL}${FAILURE_SUFFIX}"
     637    else
     638      logmessage=`echo "${@}" | sed 's/\\\033[^a-zA-Z]*.//g'`
     639      /bin/echo -e "${logmessage} FAIL"
     640    fi
    615641
    616642    # Strip non-printable characters from log file
     
    625651log_failure_msg2()
    626652{
    627     /bin/echo -n -e "${BMPREFIX}${@}"
    628     /bin/echo -e "${CURS_ZERO}${FAILURE_PREFIX}${SET_COL}${FAILURE_SUFFIX}"
     653    if [ "x$HEADLESS" != "xyes" ]
     654    then
     655      /bin/echo -n -e "${BMPREFIX}${@}"
     656      /bin/echo -e "${CURS_ZERO}${FAILURE_PREFIX}${SET_COL}${FAILURE_SUFFIX}"
     657    else
     658      echo "FAIL"
     659    fi
    629660
    630661    echo "FAIL" >> ${BOOTLOG}
     
    644675log_warning_msg()
    645676{
    646     /bin/echo -n -e "${BMPREFIX}${@}"
    647     /bin/echo -e "${CURS_ZERO}${WARNING_PREFIX}${SET_COL}${WARNING_SUFFIX}"
     677    if [ "x$HEADLESS" != "xyes" ]
     678    then
     679      /bin/echo -n -e "${BMPREFIX}${@}"
     680      /bin/echo -e "${CURS_ZERO}${WARNING_PREFIX}${SET_COL}${WARNING_SUFFIX}"
     681    else
     682      logmessage=`echo "${@}" | sed 's/\\\033[^a-zA-Z]*.//g'`
     683      /bin/echo -e "${logmessage} WARN"
     684    fi
    648685
    649686    # Strip non-printable characters from log file
     
    657694log_skip_msg()
    658695{
    659     /bin/echo -n -e "${BMPREFIX}${@}"
    660     /bin/echo -e "${CURS_ZERO}${SKIP_PREFIX}${SET_COL}${SKIP_SUFFIX}"
     696    if [ "x$HEADLESS" != "xyes" ]
     697    then
     698      /bin/echo -n -e "${BMPREFIX}${@}"
     699      /bin/echo -e "${CURS_ZERO}${SKIP_PREFIX}${SET_COL}${SKIP_SUFFIX}"
     700    else
     701      logmessage=`echo "${@}" | sed 's/\\\033[^a-zA-Z]*.//g'`
     702      /bin/echo "SKIP"
     703    fi
    661704
    662705    # Strip non-printable characters from log file
     
    678721log_info_msg()
    679722{
    680     /bin/echo -n -e "${BMPREFIX}${@}"
     723    if [ "x$HEADLESS" != "xyes" ]
     724    then
     725      /bin/echo -n -e "${BMPREFIX}${@}"
     726    else
     727      logmessage=`echo "${@}" | sed 's/\\\033[^a-zA-Z]*.//g'`
     728      /bin/echo -n -e "${logmessage}"
     729    fi
    681730
    682731    # Strip non-printable characters from log file
     
    690739log_info_msg2()
    691740{
    692     /bin/echo -n -e "${@}"
     741    if [ "x$HEADLESS" != "xyes" ]
     742    then
     743      /bin/echo -n -e "${@}"
     744    else
     745      logmessage=`echo "${@}" | sed 's/\\\033[^a-zA-Z]*.//g'`
     746      /bin/echo -n -e "${logmessage}"
     747    fi
    693748
    694749    # Strip non-printable characters from log file
  • chapter01/changelog.xml

    r7a0aa45 rb9908a1a  
    4545      <itemizedlist>
    4646        <listitem>
     47          <para>[bdubbs] - Update lfs-bootscripts to only output
     48          escape sequences to a terminal. </para>
     49        </listitem>
     50      </itemizedlist>
     51    </listitem>
     52
     53    <listitem>
     54      <para>2024-07-01</para>
     55      <itemizedlist>
     56        <listitem>
    4757          <para>[bdubbs] - Update to iana-etc-20240612. Addresses
    4858          <ulink url='&lfs-ticket-root;5006'>#5006</ulink>.</para>
  • packages.ent

    r7a0aa45 rb9908a1a  
    392392<!ENTITY less-fin-sbu "less than 0.1 SBU">
    393393
    394 <!ENTITY lfs-bootscripts-version "20240630">      <!-- Scripts depend on this format -->
     394<!ENTITY lfs-bootscripts-version "20240706">      <!-- Scripts depend on this format -->
    395395<!ENTITY lfs-bootscripts-size "BOOTSCRIPTS-SIZE KB">
    396396<!ENTITY lfs-bootscripts-url "&downloads-root;lfs-bootscripts-&lfs-bootscripts-version;.tar.xz">
Note: See TracChangeset for help on using the changeset viewer.