Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Nov 2014 17:48:19 +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: r372498 - in head/sysutils/grub2-pcbsd: . files
Message-ID:  <201411121748.sACHmJVm099483@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kmoore
Date: Wed Nov 12 17:48:18 2014
New Revision: 372498
URL: https://svnweb.freebsd.org/changeset/ports/372498
QAT: https://qat.redports.org/buildarchive/r372498/

Log:
   - Fix an issue setting kenv values in grub.cfg with ; or " in the string
   - Add some default kenv values to match /boot/defaults/loader.conf
   - 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	Wed Nov 12 15:37:37 2014	(r372497)
+++ head/sysutils/grub2-pcbsd/Makefile	Wed Nov 12 17:48:18 2014	(r372498)
@@ -3,7 +3,7 @@
 
 PORTNAME=	grub2-pcbsd
 PORTVERSION=	2.02p
-PORTREVISION=	11
+PORTREVISION=	12
 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	Wed Nov 12 15:37:37 2014	(r372497)
+++ head/sysutils/grub2-pcbsd/files/10_ktrueos.in	Wed Nov 12 17:48:18 2014	(r372498)
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# Copyright 2013 iXsystems (Kris Moore)
+# Copyright 2014 iXsystems (Kris Moore)
 # All rights reserved
 #
 # Redistribution and use in source and binary forms, with or without
@@ -139,7 +139,14 @@ display_loaderopts()
     done < /tmp/.lRObjs.$$
   fi
 
-  # Any sysctls to set?
+  # Add our compat kenv lines
+  echo "    set kFreeBSD.bootfile=\"kernel\""
+  echo "    set kFreeBSD.kernel=\"kernel\""
+  echo "    set kFreeBSD.kernel_options=\"\""
+  echo "    set kFreeBSD.kernelname=\"/boot/kernel/kernel\""
+  echo "    set kFreeBSD.module_path=\"/boot/kernel;/boot/modules\""
+
+  # Any kenv to set?
   if [ "$haveSysCtls" = "1" ] ; then
     while read line
     do
@@ -147,8 +154,11 @@ display_loaderopts()
       echo "$line" | grep -q "vfs.root.mountfrom"
       if [ $? -eq 0 ] ; then continue ; fi
 
-      val="`echo $line | sed 's|"||g'`"
-      echo "    set kFreeBSD.${val}"
+      line="`echo $line | sed 's|"||g'`"
+      key="`echo $line | cut -d '=' -f 1`"
+      val="`echo $line | cut -d '=' -f 2`"
+      if [ -z "$key" -o -z "$val" ] ; then continue ; fi
+      echo "    set kFreeBSD.${key}=\"${val}\""
     done < /tmp/.lSysCtls.$$
   fi
 
@@ -160,11 +170,11 @@ display_loaderopts()
   fi
 
   # Set the grub.platform kenv variable
-  echo "    set kFreeBSD.grub.platform=\$grub_platform"
+  echo "    set kFreeBSD.grub.platform=\"\$grub_platform\""
 
   # See if we need to do GELI passphrase passthrough
   if [ "$haveGELI" = "true" ] ; then
-    echo "    set kFreeBSD.kern.geom.eli.passphrase=\$pass"
+    echo "    set kFreeBSD.kern.geom.eli.passphrase=\"\$pass\""
   fi
 }
 



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