Permalink
Browse files

Update 10_ktrueos to detect BEADM setup zpools without ROOT

as the bed
  • Loading branch information...
1 parent cec4c86 commit 98ca6614806e97fc133931080c81e1559106a0fa @kmoore134 kmoore134 committed Sep 26, 2013
Showing with 4 additions and 1 deletion.
  1. +4 −1 src-sh/pc-extractoverlay/ports-overlay/usr/local/etc/grub.d/10_ktrueos
@@ -27,6 +27,9 @@
# Script to detect TrueOS / PC-BSD disk installations and create grub
# entries for them
+ROOTFS=`mount | awk '/ \/ / {print $1}'`
+BEDS="$( echo ${ROOTFS} | awk -F '/' '{print $2}' )"
+
display_loaderopts()
{
# Optional ARG1, set to a ZFS dataset to mount and read values from
@@ -154,7 +157,7 @@ detect_beadm()
for b in `${BEADM} list 2>/dev/null| grep -v "Created" | cut -d ' ' -f 1`
do
# Got a beadm snapshot, lets get the complete dataset name
- beLine=`${BEADM} list -a | grep "/ROOT/${b}"`
+ beLine=`${BEADM} list -a | grep "/$BEDS/${b}"`
cdataset=`echo $beLine | awk '{print $1}'`
cdatadate=`echo $beLine | awk '{print $5}'`
cdatatime=`echo $beLine | awk '{print $6}'`

0 comments on commit 98ca661

Please sign in to comment.