Commits

Uelsk8s  committed 1670777

update os-prober to 1.63 add mount as default mounter

  • Participants
  • Parent commits 19d1d0a

Comments (0)

Files changed (3)

File 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 @@
+ fi
+ 
+ mounted=
+-if type grub-mount >/dev/null 2>&1 && \
+-   type grub-probe >/dev/null 2>&1 && \
+-   grub-mount "$partition" "$tmpmnt" 2>/dev/null; then
+-	mounted=1
+-	type="$(grub-probe -d "$partition" -t fs)"
+-	[ "$type" ] || type=fuseblk
+-else
++if type mount >/dev/null 2>&1; then
+ 	ro_partition "$partition"
+ 	for type in $types; do
+ 		if mount -o ro -t "$type" "$partition" "$tmpmnt" 2>/dev/null; then
+@@ -48,6 +42,12 @@
+ 			break
+ 		fi
+ 	done
++elif type grub-mount >/dev/null 2>&1 && \
++   type grub-probe >/dev/null 2>&1 && \
++   grub-mount "$partition" "$tmpmnt" 2>/dev/null; then
++	mounted=1
++	type="$(grub-probe -d "$partition" -t fs)"
++	[ "$type" ] || type=fuseblk
+ fi
+ 
+ if [ "$mounted" ]; then
+@@ -63,6 +63,10 @@
+ 				umount "$tmpmnt/boot" 2>/dev/null || true 	
+ 				if ! umount "$tmpmnt"; then
+ 					warn "failed to umount $tmpmnt"
++					sleep 1
++					if ! umount "$tmpmnt"; then
++						warn "failed to umount $tmpmnt"
++					fi
+ 				fi
+ 				rmdir "$tmpmnt" || true
+ 				exit 0
+@@ -73,6 +77,10 @@
+ 	umount "$tmpmnt/boot" 2>/dev/null || true 	
+ 	if ! umount "$tmpmnt"; then
+ 		warn "failed to umount $tmpmnt"
++		sleep 1
++		if ! umount "$tmpmnt"; then
++			warn "failed to umount $tmpmnt"
++		fi
+ 	fi
+ fi
+ 
+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 @@
+ fi
+ 
+ mounted=
+-if type grub-mount >/dev/null 2>&1 && \
++if type mount >/dev/null 2>&1;then
++	ro_partition "$partition"
++	for type in $types $delaytypes; do
++		if mount -o ro -t "$type" "$partition" "$tmpmnt" 2>/dev/null; then
++			debug "mounted as $type filesystem"
++			mounted=1
++			break
++		fi
++	done
++elif type grub-mount >/dev/null 2>&1 && \
+    type grub-probe >/dev/null 2>&1 && \
+    grub-mount "$partition" "$tmpmnt" 2>/dev/null; then
+ 	mounted=1
+@@ -57,15 +66,6 @@
+ 		debug "mounted using GRUB, but unknown filesystem?"
+ 		type=fuseblk
+ 	fi
+-else
+-	ro_partition "$partition"
+-	for type in $types $delaytypes; do
+-		if mount -o ro -t "$type" "$partition" "$tmpmnt" 2>/dev/null; then
+-			debug "mounted as $type filesystem"
+-			mounted=1
+-			break
+-		fi
+-	done
+ fi
+ 
+ if [ "$mounted" ]; then
+@@ -76,6 +76,10 @@
+ 				debug "os found by subtest $test"
+ 				if ! umount "$tmpmnt"; then
+ 					warn "failed to umount $tmpmnt"
++					sleep 1
++					if ! umount "$tmpmnt"; then
++						warn "failed to umount $tmpmnt"
++					fi
+ 				fi
+ 				rmdir "$tmpmnt" || true
+ 				exit 0
+@@ -84,6 +88,10 @@
+ 	done
+ 	if ! umount "$tmpmnt"; then
+ 		warn "failed to umount $tmpmnt"
++		sleep 1
++		if ! umount "$tmpmnt"; then
++			warn "failed to umount $tmpmnt"
++		fi
+ 	fi
+ fi
+ 

File var/vabs/os-prober/src/patches/os-prober.reiserfs.diff

+--- ./os-probes/init/common/10filesystems.orig	2013-07-23 02:38:08.000000000 -0500
++++ ./os-probes/init/common/10filesystems	2013-08-30 15:21:07.382157112 -0500
+@@ -2,7 +2,7 @@
+ # Make sure filesystems are available.
+ set +e	# ignore errors from modprobe
+ 
+-FILESYSTEMS='ext2 ext3 ext4 xfs jfs msdos vfat ntfs minix hfs hfsplus qnx4 ufs btrfs'
++FILESYSTEMS='ext2 ext3 ext4 reiserfs xfs jfs msdos vfat ntfs minix hfs hfsplus qnx4 ufs btrfs'
+ # fuse is needed to make grub-mount work.
+ FILESYSTEMS="$FILESYSTEMS fuse"
+ # The Ubuntu kernel udebs put a number of filesystem modules in

File var/vabs/os-prober/src/patches/os-prober.reiserfs.diff.gz

Binary file removed.