diff --git a/sysutils/grub2-pcbsd/Makefile b/sysutils/grub2-pcbsd/Makefile index 4141e4ec1f62..c638c161bb74 100644 --- a/sysutils/grub2-pcbsd/Makefile +++ b/sysutils/grub2-pcbsd/Makefile @@ -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/ diff --git a/sysutils/grub2-pcbsd/files/10_ktrueos.in b/sysutils/grub2-pcbsd/files/10_ktrueos.in index 10de616ea012..17fa866fc842 100644 --- a/sysutils/grub2-pcbsd/files/10_ktrueos.in +++ b/sysutils/grub2-pcbsd/files/10_ktrueos.in @@ -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 }