From owner-svn-ports-head@FreeBSD.ORG Fri Dec 5 20:46:05 2014 Return-Path: Delivered-To: svn-ports-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 434A8924; Fri, 5 Dec 2014 20:46:05 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 24AC23E5; Fri, 5 Dec 2014 20:46:05 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id sB5Kk5hO030620; Fri, 5 Dec 2014 20:46:05 GMT (envelope-from kmoore@FreeBSD.org) Received: (from kmoore@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id sB5Kk4BK030613; Fri, 5 Dec 2014 20:46:04 GMT (envelope-from kmoore@FreeBSD.org) Message-Id: <201412052046.sB5Kk4BK030613@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: kmoore set sender to kmoore@FreeBSD.org using -f From: Kris Moore Date: Fri, 5 Dec 2014 20:46:04 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r374080 - in head/sysutils/grub2-pcbsd: . files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Dec 2014 20:46:05 -0000 Author: kmoore Date: Fri Dec 5 20:46:03 2014 New Revision: 374080 URL: https://svnweb.freebsd.org/changeset/ports/374080 QAT: https://qat.redports.org/buildarchive/r374080/ Log: - Update the order in which BE's are listed in generated GRUB menus The first item listed will be the one we are booting by default now - Bump PORTREV Modified: head/sysutils/grub2-pcbsd/Makefile head/sysutils/grub2-pcbsd/files/00_header.in head/sysutils/grub2-pcbsd/files/10_ktrueos.in Modified: head/sysutils/grub2-pcbsd/Makefile ============================================================================== --- head/sysutils/grub2-pcbsd/Makefile Fri Dec 5 19:12:32 2014 (r374079) +++ head/sysutils/grub2-pcbsd/Makefile Fri Dec 5 20:46:03 2014 (r374080) @@ -3,7 +3,7 @@ PORTNAME= grub2-pcbsd PORTVERSION= 2.02p -PORTREVISION= 13 +PORTREVISION= 14 CATEGORIES= sysutils MASTER_SITES= http://www.pcbsd.org/~kris/software/ \ ftp://ftp.pcbsd.org/pub/software/ Modified: head/sysutils/grub2-pcbsd/files/00_header.in ============================================================================== --- head/sysutils/grub2-pcbsd/files/00_header.in Fri Dec 5 19:12:32 2014 (r374079) +++ head/sysutils/grub2-pcbsd/files/00_header.in Fri Dec 5 20:46:03 2014 (r374080) @@ -44,25 +44,8 @@ else BEADM="beadm" fi -# If GRUB_DEFAULT is unset, lets figure out which beadm wants to use by default if [ "x${GRUB_DEFAULT}" = "x" ] ; then GRUB_DEFAULT=0 - beCount=0 - $BEADM list -H >/tmp/.grub-beadm.$$ 2>/dev/null - while read line - do - flags=`echo $line | awk '{print $2}'` - - # Is this BE marked as wanting to be used for next boot? Make it default if so - if [ "$flags" = "NR" -o "$flags" = "R" ] ; then - GRUB_DEFAULT="$beCount" - break - fi - - # Moving onto next target - beCount=`expr $beCount + 1` - done < /tmp/.grub-beadm.$$ - rm /tmp/.grub-beadm.$$ fi if [ "x${GRUB_DEFAULT}" = "xsaved" ] ; then GRUB_DEFAULT='${saved_entry}' ; fi if [ "x${GRUB_TIMEOUT}" = "x" ] ; then GRUB_TIMEOUT=5 ; fi Modified: head/sysutils/grub2-pcbsd/files/10_ktrueos.in ============================================================================== --- head/sysutils/grub2-pcbsd/files/10_ktrueos.in Fri Dec 5 19:12:32 2014 (r374079) +++ head/sysutils/grub2-pcbsd/files/10_ktrueos.in Fri Dec 5 20:46:03 2014 (r374080) @@ -200,8 +200,24 @@ detect_beadm() NICK="TrueOS" fi + # Figure out which BE to list first + $BEADM list -H >/tmp/.grub-beadm.$$ 2>/dev/null + while read line + do + be=`echo $line | awk '{print $1}'` + flags=`echo $line | awk '{print $2}'` + + # Is this BE marked as wanting to be used for next boot? Make it the first one if so + if [ "$flags" = "NR" -o "$flags" = "R" ] ; then + BE_LIST="$be $BE_LIST" + continue + fi + BE_LIST="$BE_LIST $be" + done < /tmp/.grub-beadm.$$ + rm /tmp/.grub-beadm.$$ + # Get list of beadm datasets - for b in `${BEADM} list -H 2>/dev/null | awk '{print $1}'` + for b in $BE_LIST do # Got a beadm snapshot, lets get the complete dataset name beLine=`${BEADM} list -a | grep "/$BEDS/${b}"`