mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-06-19 03:39:20 +01:00
use /run for runtime state directories
git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@12093 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689
This commit is contained in:
parent
a892a142e5
commit
02776dffe1
@ -1,3 +1,6 @@
|
||||
2021-01-13 Xi Ruoyao <xry111@mengyan1223.wang>
|
||||
* Use /run instead of deprecated /var/run
|
||||
|
||||
2020-10-02 DJ Lucas <dj@linuxfromscratch.org>
|
||||
* make $local_fs a Should-Stop dependency of swap to allow clean install
|
||||
|
||||
|
@ -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})
|
||||
|
@ -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
|
||||
|
@ -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" \
|
||||
|
@ -42,6 +42,22 @@
|
||||
<listitem revision="sysv"> or <listitem revision="systemd"> as
|
||||
appropriate for the entry or if needed the entire day's listitem.
|
||||
-->
|
||||
<listitem>
|
||||
<para>2021-01-13</para>
|
||||
<itemizedlist>
|
||||
<listitem revision="systemd">
|
||||
<para>[xry111] - Fix util-linux uuidd socket path.</para>
|
||||
</listitem>
|
||||
<listitem>
|
||||
<para>[xry111] - Remove various references to deprecated
|
||||
/var/run, use /run insteadly.</para>
|
||||
</listitem>
|
||||
<listitem revision="sysv">
|
||||
<para>[xry111] - Update to lfs-bootscripts-20210113.</para>
|
||||
</listitem>
|
||||
</itemizedlist>
|
||||
</listitem>
|
||||
|
||||
<listitem>
|
||||
<itemizedlist>
|
||||
<para>2021-01-01</para>
|
||||
|
@ -19,7 +19,7 @@
|
||||
</indexterm>
|
||||
|
||||
<indexterm zone="ch-tools-createfiles">
|
||||
<primary sortas="e-/var/run/utmp">/var/run/utmp</primary>
|
||||
<primary sortas="e-/run/utmp">/run/utmp</primary>
|
||||
</indexterm>
|
||||
|
||||
<indexterm zone="ch-tools-createfiles">
|
||||
@ -69,7 +69,7 @@ EOF</userinput></screen>
|
||||
<literal>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
|
||||
|
@ -58,7 +58,8 @@
|
||||
--disable-runuser \
|
||||
--disable-pylibmount \
|
||||
--disable-static \
|
||||
--without-python</userinput></screen>
|
||||
--without-python \
|
||||
runstatedir=/run</userinput></screen>
|
||||
|
||||
<variablelist>
|
||||
<title>The meaning of the configure options:</title>
|
||||
@ -90,6 +91,15 @@
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term><parameter>runstatedir=/run</parameter></term>
|
||||
<listitem>
|
||||
<para>This switch sets the location of the socket used by
|
||||
<command>uuidd</command> and
|
||||
<filename class="libraryfile">libuuid</filename> correctly.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
</variablelist>
|
||||
|
||||
<para>Compile the package:</para>
|
||||
|
@ -472,7 +472,7 @@ meson --prefix=/usr \
|
||||
<term><command>runlevel</command></term>
|
||||
<listitem>
|
||||
<para>Outputs the previous and the current run-level, as noted in the
|
||||
last run-level record in <filename>/var/run/utmp</filename></para>
|
||||
last run-level record in <filename>/run/utmp</filename></para>
|
||||
<indexterm zone="ch-system-systemd runlevel">
|
||||
<primary sortas="b-runlevel">runlevel</primary>
|
||||
</indexterm>
|
||||
|
@ -185,7 +185,7 @@
|
||||
<term><command>runlevel</command></term>
|
||||
<listitem>
|
||||
<para>Reports the previous and the current run-level, as noted in the
|
||||
last run-level record in <filename>/var/run/utmp</filename></para>
|
||||
last run-level record in <filename>/run/utmp</filename></para>
|
||||
<indexterm zone="ch-system-sysvinit runlevel-sysv">
|
||||
<primary sortas="b-runlevel">runlevel</primary>
|
||||
</indexterm>
|
||||
|
@ -76,7 +76,8 @@
|
||||
--disable-runuser \
|
||||
--disable-pylibmount \
|
||||
--disable-static \
|
||||
--without-python</userinput></screen>
|
||||
--without-python \
|
||||
runstatedir=/run</userinput></screen>
|
||||
|
||||
<para>The --disable and --without options prevent warnings about
|
||||
building components that require packages not in LFS or are
|
||||
|
@ -85,9 +85,9 @@
|
||||
<term><command>cleanfs</command></term>
|
||||
<listitem>
|
||||
<para>Removes files that should not be preserved between reboots, such
|
||||
as those in <filename class="directory">/var/run/</filename> and
|
||||
as those in <filename class="directory">/run/</filename> and
|
||||
<filename class="directory">/var/lock/</filename>; it re-creates
|
||||
<filename>/var/run/utmp</filename> and removes the possibly present
|
||||
<filename>/run/utmp</filename> and removes the possibly present
|
||||
<filename>/etc/nologin</filename>, <filename>/fastboot</filename>, and
|
||||
<filename>/forcefsck</filename> files</para>
|
||||
<indexterm zone="ch-config-bootscripts cleanfs-bootscripts">
|
||||
|
@ -1,13 +1,13 @@
|
||||
<!ENTITY version "SVN-20210101">
|
||||
<!ENTITY version "SVN-20210113">
|
||||
<!ENTITY short-version "svn"> <!-- Used below in &blfs-book;
|
||||
Change to x.y for release but not -rc releases -->
|
||||
<!ENTITY generic-version "development"> <!-- Use "development" or "x.y[-pre{x}]" -->
|
||||
|
||||
<!ENTITY versiond "20210101-systemd">
|
||||
<!ENTITY versiond "20210113-systemd">
|
||||
<!ENTITY short-versiond "systemd">
|
||||
<!ENTITY generic-versiond "systemd">
|
||||
|
||||
<!ENTITY releasedate "January 1st, 2021">
|
||||
<!ENTITY releasedate "January 13th, 2021">
|
||||
|
||||
<!ENTITY copyrightdate "1999-2021"><!-- jhalfs needs a literal dash, not – -->
|
||||
|
||||
|
@ -375,7 +375,7 @@
|
||||
<!ENTITY less-fin-du "4.1 MB">
|
||||
<!ENTITY less-fin-sbu "less than 0.1 SBU">
|
||||
|
||||
<!ENTITY lfs-bootscripts-version "20201019"> <!-- Scripts depend on this format -->
|
||||
<!ENTITY lfs-bootscripts-version "20210113"> <!-- Scripts depend on this format -->
|
||||
<!ENTITY lfs-bootscripts-size "BOOTSCRIPTS-SIZE KB">
|
||||
<!ENTITY lfs-bootscripts-url "&downloads-root;lfs-bootscripts-&lfs-bootscripts-version;.tar.xz">
|
||||
<!ENTITY lfs-bootscripts-md5 "BOOTSCRIPTS-MD5SUM">
|
||||
|
Loading…
Reference in New Issue
Block a user