From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Uyn4Y-0001Jc-1M for mharc-grub-devel@gnu.org; Mon, 15 Jul 2013 14:00:30 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34146) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uyn4S-0001Im-Hh for grub-devel@gnu.org; Mon, 15 Jul 2013 14:00:27 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Uyn4O-0005FX-Rs for grub-devel@gnu.org; Mon, 15 Jul 2013 14:00:24 -0400 Received: from aserp1040.oracle.com ([141.146.126.69]:42654) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Uyn4O-00056t-LX for grub-devel@gnu.org; Mon, 15 Jul 2013 14:00:20 -0400 Received: from acsinet21.oracle.com (acsinet21.oracle.com [141.146.126.237]) by aserp1040.oracle.com (Sentrion-MTA-4.3.1/Sentrion-MTA-4.3.1) with ESMTP id r6FI0AGM022123 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Mon, 15 Jul 2013 18:00:16 GMT Received: from userz7022.oracle.com (userz7022.oracle.com [156.151.31.86]) by acsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r6FI08wP017286 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 15 Jul 2013 18:00:10 GMT Received: from abhmt114.oracle.com (abhmt114.oracle.com [141.146.116.66]) by userz7022.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id r6FI07Hf005484 for ; Mon, 15 Jul 2013 18:00:08 GMT Received: from phenom.dumpdata.com (/50.195.21.189) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Mon, 15 Jul 2013 11:00:07 -0700 Received: by phenom.dumpdata.com (Postfix, from userid 1000) id BEB9F1BF76D; Mon, 15 Jul 2013 14:00:06 -0400 (EDT) Date: Mon, 15 Jul 2013 14:00:06 -0400 From: Konrad Rzeszutek Wilk To: grub-devel@gnu.org Subject: [PATCH] remove dependency on /boot/config-* in grub.d/20_linux_xen Message-ID: <20130715180006.GA2433@phenom.dumpdata.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Source-IP: acsinet21.oracle.com [141.146.126.237] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 141.146.126.69 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jul 2013 18:00:28 -0000 Hey, There is a discussion on the linux-kernel mailing list in which the Linus states that "if you depend on any config file, you're broken by definition" (https://lkml.org/lkml/2013/7/15/368). The 20_linux_xen does that however it should not do it. In all fairness this check is a bit of old as pretty much any upstream kernel is being built by default from distros to boot with Xen. If it does not, Xen will print a message telling the user that Linux does not have the required components. This patch removes said check. Signed-off-by: Konrad Rzeszutek Wilk === modified file 'util/grub.d/20_linux_xen.in' --- util/grub.d/20_linux_xen.in 2013-03-24 13:03:33 +0000 +++ util/grub.d/20_linux_xen.in 2013-07-15 17:34:32 +0000 @@ -144,20 +144,8 @@ } linux_list=`for i in /boot/vmlinu[xz]-* /vmlinu[xz]-* /boot/kernel-*; do - if grub_file_is_not_garbage "$i"; then - basename=$(basename $i) - version=$(echo $basename | sed -e "s,^[^0-9]*-,,g") - dirname=$(dirname $i) - config= - for j in "${dirname}/config-${version}" "${dirname}/config-${alt_version}" "/etc/kernels/kernel-config-${version}" ; do - if test -e "${j}" ; then - config="${j}" - break - fi - done - if (grep -qx "CONFIG_XEN_DOM0=y" "${config}" 2> /dev/null || grep -qx "CONFIG_XEN_PRIVILEGED_GUEST=y" "${config}" 2> /dev/null); then echo -n "$i " ; fi - fi - done` + if grub_file_is_not_garbage "$i"; then echo -n "$i "; fi + done` if [ "x${linux_list}" = "x" ] ; then exit 0 fi