do not symlink /var/log to /run/log
some programs e.g. systemd-journald expect a directory in /var/log as the marker to do some actions. Here journald tries to flush /run/log/journal to /var/log/journal, if the directory is seen. /var/log is now a symlink to /run/initramfs/log.master
parent
3a04bddeed
commit
99d4fd6bb7
|
|
@ -1300,7 +1300,6 @@ if [[ $kernel_only != yes ]]; then
|
||||||
|
|
||||||
ln -sfn ../run "$initdir/var/run"
|
ln -sfn ../run "$initdir/var/run"
|
||||||
ln -sfn ../run/lock "$initdir/var/lock"
|
ln -sfn ../run/lock "$initdir/var/lock"
|
||||||
ln -sfn ../run/log "$initdir/var/log"
|
|
||||||
else
|
else
|
||||||
for d in lib "$libdir"; do
|
for d in lib "$libdir"; do
|
||||||
[[ -e "${initdir}${prefix}/$d" ]] && continue
|
[[ -e "${initdir}${prefix}/$d" ]] && continue
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
d /run/initramfs 0755 root root -
|
||||||
|
d /run/initramfs/log 0755 root root -
|
||||||
|
L /var/log - - - - ../run/initramfs/log
|
||||||
|
|
@ -123,6 +123,8 @@ install() {
|
||||||
$systemdsystemunitdir/slices.target \
|
$systemdsystemunitdir/slices.target \
|
||||||
$systemdsystemunitdir/system.slice \
|
$systemdsystemunitdir/system.slice \
|
||||||
\
|
\
|
||||||
|
$tmpfilesdir/systemd.conf \
|
||||||
|
\
|
||||||
journalctl systemctl echo swapoff systemd-cgls systemd-tmpfiles
|
journalctl systemctl echo swapoff systemd-cgls systemd-tmpfiles
|
||||||
|
|
||||||
inst_multiple -o \
|
inst_multiple -o \
|
||||||
|
|
@ -232,6 +234,9 @@ install() {
|
||||||
ln_r "$systemdsystemunitdir/${i}" "$systemdsystemunitdir/initrd.target.wants/${i}"
|
ln_r "$systemdsystemunitdir/${i}" "$systemdsystemunitdir/initrd.target.wants/${i}"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
inst_simple "$moddir/dracut-tmpfiles.conf" "$tmpfilesdir/dracut-tmpfiles.conf"
|
||||||
|
|
||||||
|
|
||||||
mkdir -p "$initdir/etc/systemd"
|
mkdir -p "$initdir/etc/systemd"
|
||||||
# turn off RateLimit for journal
|
# turn off RateLimit for journal
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,11 @@ if [ -n "$NEWROOT" ]; then
|
||||||
[ -d $NEWROOT ] || mkdir -p -m 0755 $NEWROOT
|
[ -d $NEWROOT ] || mkdir -p -m 0755 $NEWROOT
|
||||||
fi
|
fi
|
||||||
|
|
||||||
[ -d /run/initramfs ] || mkdir -p -m 0755 /run/initramfs
|
if ! [ -d /run/initramfs ]; then
|
||||||
|
mkdir -p -m 0755 /run/initramfs/log
|
||||||
|
ln -sfn /run/initramfs/log /var/log
|
||||||
|
fi
|
||||||
|
|
||||||
[ -d /run/lock ] || mkdir -p -m 0755 /run/lock
|
[ -d /run/lock ] || mkdir -p -m 0755 /run/lock
|
||||||
[ -d /run/log ] || mkdir -p -m 0755 /run/log
|
[ -d /run/log ] || mkdir -p -m 0755 /run/log
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue