From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) by finch.gentoo.org (Postfix) with ESMTP id 65EC2138010 for ; Tue, 16 Oct 2012 00:03:14 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 32118E0384; Tue, 16 Oct 2012 00:03:06 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id A70A1E0102 for ; Tue, 16 Oct 2012 00:03:05 +0000 (UTC) Received: from hornbill.gentoo.org (hornbill.gentoo.org [94.100.119.163]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 1472E33C394 for ; Tue, 16 Oct 2012 00:03:05 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by hornbill.gentoo.org (Postfix) with ESMTP id B4078E5436 for ; Tue, 16 Oct 2012 00:03:03 +0000 (UTC) From: "Robin H. Johnson" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Robin H. Johnson" Message-ID: <1350345751.7e224199ffbf67af99e57d4aa2cf3a7a625b87ac.robbat2@gentoo> Subject: [gentoo-commits] proj/genkernel:master commit in: /, defaults/ X-VCS-Repository: proj/genkernel X-VCS-Files: ChangeLog defaults/linuxrc X-VCS-Directories: / defaults/ X-VCS-Committer: robbat2 X-VCS-Committer-Name: Robin H. Johnson X-VCS-Revision: 7e224199ffbf67af99e57d4aa2cf3a7a625b87ac X-VCS-Branch: master Date: Tue, 16 Oct 2012 00:03:03 +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-Archives-Salt: b4c61f83-d9db-4f89-9c70-6797d0307ffb X-Archives-Hash: 7dc467f64feeec468c202bde7af1c667 commit: 7e224199ffbf67af99e57d4aa2cf3a7a625b87ac Author: Peter Hjalmarsson rymdraket net> AuthorDate: Mon Apr 9 18:03:01 2012 +0000 Commit: Robin H. Johnson gentoo org> CommitDate: Tue Oct 16 00:02:31 2012 +0000 URL: http://git.overlays.gentoo.org/gitweb/?p=proj/genkernel.git;a=commit;h=7e224199 Support using init= on the command line We do not support ramdisk, only initramfs nowdays. So init= is a dead command, and we may as well have it do the same as it does for dracut and in the Linux kernel documentation. (Use rdinit to choose the initramfs init file) Signed-off-by: Robin H. Johnson gentoo.org> --- ChangeLog | 3 +++ defaults/linuxrc | 8 ++++++++ 2 files changed, 11 insertions(+), 0 deletions(-) diff --git a/ChangeLog b/ChangeLog index dfe39e2..023016b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ # Distributed under the GPL v2 # $Id$ + 15 Oct 2012; Peter Hjalmarsson defaults/linuxrc: + Support using init= on the command line. + 15 Oct 2012; Peter Hjalmarsson README, doc/genkernel.8.txt, gen_bootloader.sh, genkernel: Update the documentation to reflect current status re real_root/init. diff --git a/defaults/linuxrc b/defaults/linuxrc index 48446ba..1bc09a7 100755 --- a/defaults/linuxrc +++ b/defaults/linuxrc @@ -36,6 +36,7 @@ quiet_kmsg CMDLINE=$(cat /proc/cmdline) # Scan CMDLINE for any specified real_root= or cdroot arguments FAKE_ROOT='' +FAKE_INIT='' REAL_ROOTFLAGS='' ROOTFSTYPE='auto' CRYPT_SILENT=0 @@ -56,6 +57,9 @@ do real_init=*) REAL_INIT=${x#*=} ;; + init=*) + FAKE_INIT=${x#*=} + ;; init_opts=*) INIT_OPTS=${x#*=} ;; @@ -263,6 +267,10 @@ if [ -z "${REAL_ROOT}" -a \( "${CDROOT}" = '0' \) -a \( "${FAKE_ROOT}" != "/dev then REAL_ROOT="${FAKE_ROOT}" fi +if [ -z "${REAL_INIT}" -a \( "${CDROOT}" = '0' \) -a \( "${FAKE_INIT}" != "/linuxrc" \) ] +then + REAL_INIT="${FAKE_INIT}" +fi # Set variables based on the value of REAL_ROOT case "${REAL_ROOT}" in