diff options
author | Thomas Deutschmann <whissi@gentoo.org> | 2020-08-28 15:16:36 +0200 |
---|---|---|
committer | Thomas Deutschmann <whissi@gentoo.org> | 2020-08-28 18:35:55 +0200 |
commit | 8c19b84644d3a0b7f70b101b9c83931280028eb7 (patch) | |
tree | fe9dca3ddc4f1287a3906f6dc16ff57363659276 /defaults/linuxrc | |
parent | Remove --disklabel option (diff) | |
download | genkernel-8c19b84644d3a0b7f70b101b9c83931280028eb7.tar.gz genkernel-8c19b84644d3a0b7f70b101b9c83931280028eb7.tar.bz2 genkernel-8c19b84644d3a0b7f70b101b9c83931280028eb7.zip |
defaults/linuxrc: Always preserve log
Now that we are using UDEV and have to preserve /run, we can also
use /run to always store log from initramfs.
This will make debugging easier because user don't have to explicit
enable logging (disabling is still possible).
Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>
Diffstat (limited to 'defaults/linuxrc')
-rw-r--r-- | defaults/linuxrc | 39 |
1 files changed, 6 insertions, 33 deletions
diff --git a/defaults/linuxrc b/defaults/linuxrc index afb91d8..a4ed811 100644 --- a/defaults/linuxrc +++ b/defaults/linuxrc @@ -35,6 +35,12 @@ mount -t proc -o noexec,nosuid,nodev proc /proc >/dev/null 2>&1 mount -o remount,rw / >/dev/null 2>&1 mount -t tmpfs -o rw,nosuid,nodev,relatime,mode=755 none /run 2>&1 +if [ ! -d /run/initramfs ] +then + mkdir -p /run/initramfs + chmod 0750 /run/initramfs +fi + # Prevent superfluous printks from being printed to the console echo 1 > /proc/sys/kernel/printk @@ -306,37 +312,6 @@ do fi unset tmp_disabled ;; - gk.log.keep=*) - case "${x#*=}" in - [Tt][Rr][Uu][Ee]) - GK_INIT_LOG_COPYTO="${GK_INIT_LOG_COPYTO_DEFAULT}" - ;; - [Yy][Ee][Ss]) - GK_INIT_LOG_COPYTO="${GK_INIT_LOG_COPYTO_DEFAULT}" - ;; - [Yy]) - GK_INIT_LOG_COPYTO="${GK_INIT_LOG_COPYTO_DEFAULT}" - ;; - 1) - GK_INIT_LOG_COPYTO="${GK_INIT_LOG_COPYTO_DEFAULT}" - ;; - [Ff][Aa][Ll][Ss][Ee]) - GK_INIT_LOG_COPYTO= - ;; - [Nn][Oo]) - GK_INIT_LOG_COPYTO= - ;; - [Nn]) - GK_INIT_LOG_COPYTO= - ;; - 0) - GK_INIT_LOG_COPYTO= - ;; - *) - GK_INIT_LOG_COPYTO=${x#*=} - ;; - esac - ;; gk.sshd.port=*) tmp_port=${x#*=} if is_int "${tmp_port}" @@ -1338,8 +1313,6 @@ fi # Run debug shell if requested rundebugshell "before entering switch_root" -preserve_log - # init_opts is set in the environment by the kernel when it parses the command line init=${REAL_INIT:-/sbin/init} if ! mountpoint "${CHROOT}" 1>/dev/null 2>&1 |