diff --git a/bootscripts/ChangeLog b/bootscripts/ChangeLog index 03330e3d0..fd43c1222 100644 --- a/bootscripts/ChangeLog +++ b/bootscripts/ChangeLog @@ -1,3 +1,6 @@ +2021-01-13 Xi Ruoyao + * Use /run instead of deprecated /var/run + 2020-10-02 DJ Lucas * make $local_fs a Should-Stop dependency of swap to allow clean install diff --git a/bootscripts/lfs/init.d/cleanfs b/bootscripts/lfs/init.d/cleanfs index 2dee92967..bbca3ddf6 100644 --- a/bootscripts/lfs/init.d/cleanfs +++ b/bootscripts/lfs/init.d/cleanfs @@ -21,8 +21,8 @@ # Default-Start: S # Default-Stop: # Short-Description: Cleans temporary directories early in the boot process. -# Description: Cleans temporary directories /var/run, /var/lock, and -# optionally, /tmp. cleanfs also creates /var/run/utmp +# Description: Cleans temporary directories /run, /var/lock, and +# optionally, /tmp. cleanfs also creates /run/utmp # and any files defined in /etc/sysconfig/createfiles. # X-LFS-Provided-By: LFS ### END INIT INFO @@ -95,11 +95,11 @@ case "${1}" in find . -xdev -mindepth 1 ! -name lost+found -delete || failed=1 fi - > /var/run/utmp + > /run/utmp if grep -q '^utmp:' /etc/group ; then - chmod 664 /var/run/utmp - chgrp utmp /var/run/utmp + chmod 664 /run/utmp + chgrp utmp /run/utmp fi (exit ${failed}) diff --git a/bootscripts/lfs/init.d/rc b/bootscripts/lfs/init.d/rc index f27f5469c..2bc155ed4 100644 --- a/bootscripts/lfs/init.d/rc +++ b/bootscripts/lfs/init.d/rc @@ -142,7 +142,7 @@ fi [ "${interactive}" != "i" ] && interactive="" # Read the state file if it exists from runlevel S -[ -r /var/run/interactive ] && source /var/run/interactive +[ -r /run/interactive ] && source /run/interactive # Attempt to stop all services started by the previous runlevel, # and killed in this runlevel @@ -217,9 +217,9 @@ done # Store interactive variable on switch from runlevel S and remove if not if [ "${runlevel}" == "S" -a "${interactive}" == "i" ]; then - echo "interactive=\"i\"" > /var/run/interactive + echo "interactive=\"i\"" > /run/interactive else - rm -f /var/run/interactive 2> /dev/null + rm -f /run/interactive 2> /dev/null fi # Copy the boot log on initial boot only diff --git a/bootscripts/lfs/lib/services/init-functions b/bootscripts/lfs/lib/services/init-functions index 174657f1f..2e9b15b98 100644 --- a/bootscripts/lfs/lib/services/init-functions +++ b/bootscripts/lfs/lib/services/init-functions @@ -358,8 +358,8 @@ killproc() prefix=`echo "${program}" | sed 's/[^/]*$//'` progname=`echo "${program}" | sed "s@${prefix}@@"` - if [ -e "/var/run/${progname}.pid" ]; then - rm -f "/var/run/${progname}.pid" 2> /dev/null + if [ -e "/run/${progname}.pid" ]; then + rm -f "/run/${progname}.pid" 2> /dev/null fi else if [ -e "${pidfile}" ]; then rm -f "${pidfile}" 2> /dev/null; fi @@ -434,8 +434,8 @@ pidofproc() fi # If a PID file exists with that name, assume that is it. - if [ -e "/var/run/${progname}.pid" ]; then - pidfile="/var/run/${progname}.pid" + if [ -e "/run/${progname}.pid" ]; then + pidfile="/run/${progname}.pid" fi fi @@ -528,9 +528,9 @@ statusproc() /bin/echo -e "${INFO}${base} is running with Process" \ "ID(s) ${pidlist}.${NORMAL}" else - if [ -n "${base}" -a -e "/var/run/${base}.pid" ]; then + if [ -n "${base}" -a -e "/run/${base}.pid" ]; then /bin/echo -e "${WARNING}${1} is not running but" \ - "/var/run/${base}.pid exists.${NORMAL}" + "/run/${base}.pid exists.${NORMAL}" else if [ -n "${pidfile}" -a -e "${pidfile}" ]; then /bin/echo -e "${WARNING}${1} is not running" \ diff --git a/chapter01/changelog.xml b/chapter01/changelog.xml index b167d8a82..12cac6c72 100644 --- a/chapter01/changelog.xml +++ b/chapter01/changelog.xml @@ -42,6 +42,22 @@ or as appropriate for the entry or if needed the entire day's listitem. --> + + 2021-01-13 + + + [xry111] - Fix util-linux uuidd socket path. + + + [xry111] - Remove various references to deprecated + /var/run, use /run insteadly. + + + [xry111] - Update to lfs-bootscripts-20210113. + + + + 2021-01-01 diff --git a/chapter07/createfiles.xml b/chapter07/createfiles.xml index c5cc7710a..1ae5ef12b 100644 --- a/chapter07/createfiles.xml +++ b/chapter07/createfiles.xml @@ -19,7 +19,7 @@ - /var/run/utmp + /run/utmp @@ -69,7 +69,7 @@ EOF root:x:0:0:root:/root:/bin/bash bin:x:1:1:bin:/dev/null:/bin/false daemon:x:6:6:Daemon User:/dev/null:/bin/false -messagebus:x:18:18:D-Bus Message Daemon User:/var/run/dbus:/bin/false +messagebus:x:18:18:D-Bus Message Daemon User:/run/dbus:/bin/false systemd-bus-proxy:x:72:72:systemd Bus Proxy:/:/bin/false systemd-journal-gateway:x:73:73:systemd Journal Gateway:/:/bin/false systemd-journal-remote:x:74:74:systemd Journal Remote:/:/bin/false diff --git a/chapter07/util-linux.xml b/chapter07/util-linux.xml index a598cb4bc..7c11642fe 100644 --- a/chapter07/util-linux.xml +++ b/chapter07/util-linux.xml @@ -58,7 +58,8 @@ --disable-runuser \ --disable-pylibmount \ --disable-static \ - --without-python + --without-python \ + runstatedir=/run The meaning of the configure options: @@ -90,6 +91,15 @@ + + runstatedir=/run + + This switch sets the location of the socket used by + uuidd and + libuuid correctly. + + + Compile the package: diff --git a/chapter08/systemd.xml b/chapter08/systemd.xml index a97d73190..2d3e3525e 100644 --- a/chapter08/systemd.xml +++ b/chapter08/systemd.xml @@ -472,7 +472,7 @@ meson --prefix=/usr \ runlevel Outputs the previous and the current run-level, as noted in the - last run-level record in /var/run/utmp + last run-level record in /run/utmp runlevel diff --git a/chapter08/sysvinit.xml b/chapter08/sysvinit.xml index 4a68cc37b..0a13f78e1 100644 --- a/chapter08/sysvinit.xml +++ b/chapter08/sysvinit.xml @@ -185,7 +185,7 @@ runlevel Reports the previous and the current run-level, as noted in the - last run-level record in /var/run/utmp + last run-level record in /run/utmp runlevel diff --git a/chapter08/util-linux.xml b/chapter08/util-linux.xml index 04bd999e3..61e05a6cf 100644 --- a/chapter08/util-linux.xml +++ b/chapter08/util-linux.xml @@ -76,7 +76,8 @@ --disable-runuser \ --disable-pylibmount \ --disable-static \ - --without-python + --without-python \ + runstatedir=/run The --disable and --without options prevent warnings about building components that require packages not in LFS or are diff --git a/chapter09/bootscripts.xml b/chapter09/bootscripts.xml index 009590d64..57c6377ff 100644 --- a/chapter09/bootscripts.xml +++ b/chapter09/bootscripts.xml @@ -85,9 +85,9 @@ cleanfs Removes files that should not be preserved between reboots, such - as those in /var/run/ and + as those in /run/ and /var/lock/; it re-creates - /var/run/utmp and removes the possibly present + /run/utmp and removes the possibly present /etc/nologin, /fastboot, and /forcefsck files diff --git a/general.ent b/general.ent index 80f244b9c..28e98fe8d 100644 --- a/general.ent +++ b/general.ent @@ -1,13 +1,13 @@ - + - + - + diff --git a/packages.ent b/packages.ent index 5eef2e72c..2c13d8ad4 100644 --- a/packages.ent +++ b/packages.ent @@ -375,7 +375,7 @@ - +