Changeset 02776dff for bootscripts


Ignore:
Timestamp:
01/13/2021 08:44:28 AM (3 years ago)
Author:
Xi Ruoyao <xry111@…>
Branches:
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, 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:
704e800
Parents:
a892a14
Message:

use /run for runtime state directories

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

Location:
bootscripts
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • bootscripts/ChangeLog

    ra892a14 r02776dff  
     12021-01-13 Xi Ruoyao <xry111@mengyan1223.wang>
     2   * Use /run instead of deprecated /var/run
     3
    142020-10-02 DJ Lucas <dj@linuxfromscratch.org>
    25   * make $local_fs a Should-Stop dependency of swap to allow clean install
  • bootscripts/lfs/init.d/cleanfs

    ra892a14 r02776dff  
    2222# Default-Stop:
    2323# Short-Description:   Cleans temporary directories early in the boot process.
    24 # Description:         Cleans temporary directories /var/run, /var/lock, and
    25 #                      optionally, /tmp.  cleanfs also creates /var/run/utmp
     24# Description:         Cleans temporary directories /run, /var/lock, and
     25#                      optionally, /tmp.  cleanfs also creates /run/utmp
    2626#                      and any files defined in /etc/sysconfig/createfiles.
    2727# X-LFS-Provided-By:   LFS
     
    9696      fi
    9797
    98       > /var/run/utmp
     98      > /run/utmp
    9999
    100100      if grep -q '^utmp:' /etc/group ; then
    101          chmod 664 /var/run/utmp
    102          chgrp utmp /var/run/utmp
     101         chmod 664 /run/utmp
     102         chgrp utmp /run/utmp
    103103      fi
    104104
  • bootscripts/lfs/init.d/rc

    ra892a14 r02776dff  
    143143
    144144# Read the state file if it exists from runlevel S
    145 [ -r /var/run/interactive ] && source /var/run/interactive
     145[ -r /run/interactive ] && source /run/interactive
    146146
    147147# Attempt to stop all services started by the previous runlevel,
     
    218218# Store interactive variable on switch from runlevel S and remove if not
    219219if [ "${runlevel}" == "S" -a "${interactive}" == "i" ]; then
    220     echo "interactive=\"i\"" > /var/run/interactive
     220    echo "interactive=\"i\"" > /run/interactive
    221221else
    222     rm -f /var/run/interactive 2> /dev/null
     222    rm -f /run/interactive 2> /dev/null
    223223fi
    224224
  • bootscripts/lfs/lib/services/init-functions

    ra892a14 r02776dff  
    359359            progname=`echo "${program}" | sed "s@${prefix}@@"`
    360360
    361             if [ -e "/var/run/${progname}.pid" ]; then
    362                 rm -f "/var/run/${progname}.pid" 2> /dev/null
     361            if [ -e "/run/${progname}.pid" ]; then
     362                rm -f "/run/${progname}.pid" 2> /dev/null
    363363            fi
    364364        else
     
    435435
    436436        # If a PID file exists with that name, assume that is it.
    437         if [ -e "/var/run/${progname}.pid" ]; then
    438             pidfile="/var/run/${progname}.pid"
     437        if [ -e "/run/${progname}.pid" ]; then
     438            pidfile="/run/${progname}.pid"
    439439        fi
    440440    fi
     
    529529         "ID(s) ${pidlist}.${NORMAL}"
    530530   else
    531       if [ -n "${base}" -a -e "/var/run/${base}.pid" ]; then
     531      if [ -n "${base}" -a -e "/run/${base}.pid" ]; then
    532532         /bin/echo -e "${WARNING}${1} is not running but" \
    533             "/var/run/${base}.pid exists.${NORMAL}"
     533            "/run/${base}.pid exists.${NORMAL}"
    534534      else
    535535         if [ -n "${pidfile}" -a -e "${pidfile}" ]; then
Note: See TracChangeset for help on using the changeset viewer.