Commits

Uelsk8s committed 756db8f

update os-prober to 1.63 add mount as default mounter

Comments (0)

Files changed (1)

var/vabs/os-prober/src/patches/mountfix.patch

 diff -Naur os-prober-1.63/linux-boot-probes/common/50mounted-tests os-prober-1.63.patched/linux-boot-probes/common/50mounted-tests
 --- os-prober-1.63/linux-boot-probes/common/50mounted-tests	2012-03-27 19:01:05.000000000 -0600
-+++ os-prober-1.63.patched/linux-boot-probes/common/50mounted-tests	2014-01-17 10:30:22.000000000 -0700
-@@ -34,13 +34,7 @@
++++ os-prober-1.63.patched/linux-boot-probes/common/50mounted-tests	2014-01-17 10:57:45.000000000 -0700
+@@ -34,13 +34,18 @@
  fi
  
  mounted=
 -	[ "$type" ] || type=fuseblk
 -else
 +if type mount >/dev/null 2>&1; then
++	if mount -o ro "$partition" "$tmpmnt" 2>/dev/null; then
++		type="$(grub-probe -d "$partition" -t fs)" || true
++		if [ "$type" ]; then
++			debug "mounted using $type filesystem driver"
++		else
++			debug "mounted, but unknown filesystem?"
++			type=fuseblk
++		fi
++		debug "mounted as $type filesystem"
++		mounted=1
++	fi
  	ro_partition "$partition"
  	for type in $types; do
  		if mount -o ro -t "$type" "$partition" "$tmpmnt" 2>/dev/null; then
-@@ -48,6 +42,12 @@
+@@ -48,6 +53,12 @@
  			break
  		fi
  	done
  fi
  
  if [ "$mounted" ]; then
-@@ -63,6 +63,10 @@
+@@ -63,6 +74,10 @@
  				umount "$tmpmnt/boot" 2>/dev/null || true 	
  				if ! umount "$tmpmnt"; then
  					warn "failed to umount $tmpmnt"
  				fi
  				rmdir "$tmpmnt" || true
  				exit 0
-@@ -73,6 +77,10 @@
+@@ -73,6 +88,10 @@
  	umount "$tmpmnt/boot" 2>/dev/null || true 	
  	if ! umount "$tmpmnt"; then
  		warn "failed to umount $tmpmnt"
  
 diff -Naur os-prober-1.63/os-probes/common/50mounted-tests os-prober-1.63.patched/os-probes/common/50mounted-tests
 --- os-prober-1.63/os-probes/common/50mounted-tests	2012-11-03 20:01:55.000000000 -0600
-+++ os-prober-1.63.patched/os-probes/common/50mounted-tests	2014-01-17 10:30:34.000000000 -0700
-@@ -46,7 +46,16 @@
++++ os-prober-1.63.patched/os-probes/common/50mounted-tests	2014-01-17 10:57:17.000000000 -0700
+@@ -46,7 +46,27 @@
  fi
  
  mounted=
 -if type grub-mount >/dev/null 2>&1 && \
 +if type mount >/dev/null 2>&1;then
++	if mount -o ro "$partition" "$tmpmnt" 2>/dev/null; then
++		type="$(grub-probe -d "$partition" -t fs)" || true
++		if [ "$type" ]; then
++			debug "mounted using $type filesystem driver"
++		else
++			debug "mounted, but unknown filesystem?"
++			type=fuseblk
++		fi
++		debug "mounted as $type filesystem"
++		mounted=1
++	fi
 +	ro_partition "$partition"
 +	for type in $types $delaytypes; do
 +		if mount -o ro -t "$type" "$partition" "$tmpmnt" 2>/dev/null; then
     type grub-probe >/dev/null 2>&1 && \
     grub-mount "$partition" "$tmpmnt" 2>/dev/null; then
  	mounted=1
-@@ -57,15 +66,6 @@
+@@ -57,15 +77,6 @@
  		debug "mounted using GRUB, but unknown filesystem?"
  		type=fuseblk
  	fi
  fi
  
  if [ "$mounted" ]; then
-@@ -76,6 +76,10 @@
+@@ -76,6 +87,10 @@
  				debug "os found by subtest $test"
  				if ! umount "$tmpmnt"; then
  					warn "failed to umount $tmpmnt"
  				fi
  				rmdir "$tmpmnt" || true
  				exit 0
-@@ -84,6 +88,10 @@
+@@ -84,6 +99,10 @@
  	done
  	if ! umount "$tmpmnt"; then
  		warn "failed to umount $tmpmnt"