Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Dec 2014 15:49:50 +0000 (UTC)
From:      Kris Moore <kmoore@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r375578 - in head/sysutils/grub2-pcbsd: . files
Message-ID:  <201412251549.sBPFnoQ9076637@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kmoore
Date: Thu Dec 25 15:49:49 2014
New Revision: 375578
URL: https://svnweb.freebsd.org/changeset/ports/375578
QAT: https://qat.redports.org/buildarchive/r375578/

Log:
  - Fix a bug using shell built-in which command
  - Add fallback when using installer 'beadm' command
  - Bump PORTREV

Modified:
  head/sysutils/grub2-pcbsd/Makefile
  head/sysutils/grub2-pcbsd/files/10_ktrueos.in

Modified: head/sysutils/grub2-pcbsd/Makefile
==============================================================================
--- head/sysutils/grub2-pcbsd/Makefile	Thu Dec 25 14:56:45 2014	(r375577)
+++ head/sysutils/grub2-pcbsd/Makefile	Thu Dec 25 15:49:49 2014	(r375578)
@@ -3,7 +3,7 @@
 
 PORTNAME=	grub2-pcbsd
 PORTVERSION=	2.02p
-PORTREVISION=	15
+PORTREVISION=	16
 CATEGORIES=	sysutils
 MASTER_SITES=   http://www.pcbsd.org/~kris/software/ \
 		ftp://ftp.pcbsd.org/pub/software/

Modified: head/sysutils/grub2-pcbsd/files/10_ktrueos.in
==============================================================================
--- head/sysutils/grub2-pcbsd/files/10_ktrueos.in	Thu Dec 25 14:56:45 2014	(r375577)
+++ head/sysutils/grub2-pcbsd/files/10_ktrueos.in	Thu Dec 25 15:49:49 2014	(r375578)
@@ -180,14 +180,21 @@ display_loaderopts()
 
 detect_beadm()
 {
-   which -s beadm
+   /usr/bin/which -s beadm >/dev/null 2>/dev/null
    if [ $? -ne 0 ] ; then return 0; fi
 
    # Check if we are running from the installer and use its beadm
    if [ -e "/root/beadm.install" ] ; then
       BEADM="/root/beadm.install"
+
+      # Check if this is valid
+      testBE=`$BEADM list`
+      if [ -z "$testBE" ] ; then
+        # No BE's, lets switch back to regular mode
+        BEADM="`/usr/bin/which beadm`"
+      fi
    else
-      BEADM="`which beadm`"
+      BEADM="`/usr/bin/which beadm`"
    fi
 
    ${BEADM} list >/dev/null 2>/dev/null



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201412251549.sBPFnoQ9076637>