From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id CD4AF138334 for ; Wed, 7 Aug 2019 15:46:13 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 9296DE0885; Wed, 7 Aug 2019 15:46:12 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 6544DE0885 for ; Wed, 7 Aug 2019 15:46:12 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 004333494A8 for ; Wed, 7 Aug 2019 15:46:11 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id A3AD4756 for ; Wed, 7 Aug 2019 15:46:09 +0000 (UTC) From: "Thomas Deutschmann" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Thomas Deutschmann" Message-ID: <1565124025.6a9db059ae26b4d38f12fc76ce33e41ca1d1e4bf.whissi@gentoo> Subject: [gentoo-commits] proj/genkernel:master commit in: defaults/ X-VCS-Repository: proj/genkernel X-VCS-Files: defaults/busy-config defaults/initrd.scripts defaults/login-remote.sh X-VCS-Directories: defaults/ X-VCS-Committer: whissi X-VCS-Committer-Name: Thomas Deutschmann X-VCS-Revision: 6a9db059ae26b4d38f12fc76ce33e41ca1d1e4bf X-VCS-Branch: master Date: Wed, 7 Aug 2019 15:46:09 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: d79b1709-16ef-42ad-8b5e-f372b5bd8326 X-Archives-Hash: 89883be62f0656c89d7bcd2d4d4bedca commit: 6a9db059ae26b4d38f12fc76ce33e41ca1d1e4bf Author: Thomas Deutschmann gentoo org> AuthorDate: Sun Aug 4 16:10:57 2019 +0000 Commit: Thomas Deutschmann gentoo org> CommitDate: Tue Aug 6 20:40:25 2019 +0000 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=6a9db059 linuxrc: Make shell startup output more beautiful and useful - Hide busybox version - Show genkernel version - Show running kernel version - Use emphasis (bold format) in text Signed-off-by: Thomas Deutschmann gentoo.org> defaults/busy-config | 2 +- defaults/initrd.scripts | 5 +++++ defaults/login-remote.sh | 22 ++++++++++++++++------ 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/defaults/busy-config b/defaults/busy-config index 7830c83..39c3010 100644 --- a/defaults/busy-config +++ b/defaults/busy-config @@ -1136,7 +1136,7 @@ CONFIG_CTTYHACK=y # CONFIG_FEATURE_SH_MATH=y CONFIG_FEATURE_SH_MATH_64=y -# CONFIG_FEATURE_SH_EXTRA_QUIET is not set +CONFIG_FEATURE_SH_EXTRA_QUIET=y # CONFIG_FEATURE_SH_STANDALONE is not set # CONFIG_FEATURE_SH_NOFORK is not set CONFIG_FEATURE_SH_HISTFILESIZE=y diff --git a/defaults/initrd.scripts b/defaults/initrd.scripts index 4c8955d..f27c02f 100644 --- a/defaults/initrd.scripts +++ b/defaults/initrd.scripts @@ -809,6 +809,11 @@ run_shell() { export PS1='rescueshell \w \# ' + echo + GOOD=${BLUE} good_msg "${NORMAL}Welcome to ${BOLD}${gk_ver}${NORMAL} (${gk_build_date}) ${BOLD}rescue shell${NORMAL}!" + GOOD=${BLUE} good_msg "${NORMAL}...running Linux kernel ${BOLD}${kernel_ver}${NORMAL}" + echo + if [ -n "${CONSOLE}" ] && [ -c "/dev/${CONSOLE}" ] then setsid ${SH} -c "exec sh --login /dev/${CONSOLE} 2>&1" diff --git a/defaults/login-remote.sh b/defaults/login-remote.sh index 7f711da..f8c4d08 100644 --- a/defaults/login-remote.sh +++ b/defaults/login-remote.sh @@ -66,23 +66,33 @@ then exit 1 esac else + gk_ver="$(cat /etc/build_id)" + gk_build_date="$(cat /etc/build_date)" + kernel_ver="$(uname -r)" + export PS1='remote rescueshell \w \# ' touch "${GK_SSHD_LOCKFILE}" - good_msg "The lockfile '${GK_SSHD_LOCKFILE}' was created." - good_msg "In order to resume boot process, run 'resume-boot'." - good_msg "Be aware that it will kill your connection which means" - good_msg "you will no longer be able work in this shell." + + GOOD=${BLUE} good_msg "${NORMAL}Welcome to ${BOLD}${gk_ver}${NORMAL} (${gk_build_date}) ${BOLD}remote rescue shell${NORMAL}!" + GOOD=${BLUE} good_msg "${NORMAL}...running Linux kernel ${BOLD}${kernel_ver}${NORMAL}" + echo + good_msg "${NORMAL}The lockfile '${BOLD}${GK_SSHD_LOCKFILE}${NORMAL}' was created." + good_msg "${NORMAL}In order to resume boot process, run '${BOLD}resume-boot${NORMAL}'." + good_msg "${NORMAL}Be aware that it will kill your connection which means" + good_msg "${NORMAL}you will no longer be able to work in this shell." if [ -n "${CRYPT_ROOT}" -a ! -f "${CRYPT_ROOT_OPENED_LOCKFILE}" ] then - good_msg "To remote unlock LUKS-encrypted root device, run 'unlock-luks root'." + good_msg "${NORMAL}To remote unlock LUKS-encrypted root device, run '${BOLD}unlock-luks root${NORMAL}'." fi if [ -n "${CRYPT_SWAP}" -a ! -f "${CRYPT_ROOT_OPENED_LOCKFILE}" ] then - good_msg "To remote unlock LUKS-encrypted swap device, run 'unlock-luks swap'." + good_msg "${NORMAL}To remote unlock LUKS-encrypted swap device, run '${BOLD}unlock-luks swap${NORMAL}'." fi + echo + [ -x /bin/sh ] && SH=/bin/sh || SH=/bin/ash exec ${SH} --login fi