Commits

Anton Afanasyev committed 34df017 Merge

Merge with default
also fixed typo in the last "Small fix." commit.

Comments (0)

Files changed (1)

 
 if [ "${1}" = "--version" -o "${1}" = "version" ]
 then
-  echo "beadm 0.8.6 2013/06/20"
+  echo "beadm 1.0 2013/10/13"
   exit 0
 fi
 
 __update_grub() {
   if [ -e /boot/grub/grub.cfg ]
   then
-    grub-mkconfig -o /boot/grub/grub.cfg
+    if grub-mkconfig -o /boot/grub/grub.cfg 1> /dev/null 2> /dev/null
+    then
+      echo "GRUB configuration updated successfully"
+    else
+      echo "WARNING: Failed to update GRUB configuration"
+    fi
   fi
 }
 
   fi
   # clone properties of source boot environment
   zfs list -H -o name -r ${SOURCE} \
+    | grep -v '@' \
     | while read FS
       do
         local OPTS=""
     done
     for tmp in ${POOLLIST}; do
       poolname=$( echo ${tmp} | cut -d ':' -f 1 )
-    PREFIX=$( echo ${poolname}/${BEDS}/${2}/ | sed 's/\//\\\//g' )
     zfs list -H -o name,mountpoint -r ${poolname}/${BEDS}/${2} \
       | grep -v -E "[[:space:]](legacy|none)$" \
       | sort -n \
                   continue
                   ;;
                 (*)
-                  MOUNTPOINT="/$( echo "${FS}" | sed s/"${PREFIX}"//g )"
+                  MOUNTPOINT="/$( echo "${FS}" | sed s^"${poolname}/${BEDS}/${2}/"^^g )"
                   ;;
               esac
             fi