Sophie

Sophie

distrib > Mageia > 5 > x86_64 > media > core-release-src > by-pkgid > 704c9bb6db073f89f2ef10e5e8f97fd3 > files > 10

os-prober-1.65-9.mga5.src.rpm

Index: b/os-probes/mounted/x86/20microsoft
===================================================================
--- a/os-probes/mounted/x86/20microsoft
+++ b/os-probes/mounted/x86/20microsoft
@@ -31,19 +31,19 @@ if item_in_dir -q bootmgr "$2"; then
 	for boot in $(item_in_dir boot "$2"); do
 		bcd=$(item_in_dir bcd "$2/$boot")
 		if [ -n "$bcd" ]; then
-			if grep -qs "W.i.n.d.o.w.s. .8" "$2/$boot/$bcd"; then
+			if grep -aqs "W.i.n.d.o.w.s. .8" "$2/$boot/$bcd"; then
 				long="Windows 8 (loader)"
-			elif grep -qs "W.i.n.d.o.w.s. .7" "$2/$boot/$bcd"; then
+			elif grep -aqs "W.i.n.d.o.w.s. .7" "$2/$boot/$bcd"; then
 				long="Windows 7 (loader)"
-			elif grep -qs "W.i.n.d.o.w.s. .V.i.s.t.a" "$2/$boot/$bcd"; then
+			elif grep -aqs "W.i.n.d.o.w.s. .V.i.s.t.a" "$2/$boot/$bcd"; then
 				long="Windows Vista (loader)"
-			elif grep -qs "W.i.n.d.o.w.s. .S.e.r.v.e.r. .2.0.0.8. .R.2." "$2/$boot/$bcd"; then
+			elif grep -aqs "W.i.n.d.o.w.s. .S.e.r.v.e.r. .2.0.0.8. .R.2." "$2/$boot/$bcd"; then
 				long="Windows Server 2008 R2 (loader)"
-			elif grep -qs "W.i.n.d.o.w.s. .S.e.r.v.e.r. .2.0.0.8." "$2/$boot/$bcd"; then
+			elif grep -aqs "W.i.n.d.o.w.s. .S.e.r.v.e.r. .2.0.0.8." "$2/$boot/$bcd"; then
 				long="Windows Server 2008 (loader)"
-			elif grep -qs "W.i.n.d.o.w.s. .R.e.c.o.v.e.r.y. .E.n.v.i.r.o.n.m.e.n.t" "$2/$boot/$bcd"; then
+			elif grep -aqs "W.i.n.d.o.w.s. .R.e.c.o.v.e.r.y. .E.n.v.i.r.o.n.m.e.n.t" "$2/$boot/$bcd"; then
 				long="Windows Recovery Environment (loader)"
-			elif grep -qs "W.i.n.d.o.w.s. .S.e.t.u.p" "$2/$boot/$bcd"; then
+			elif grep -aqs "W.i.n.d.o.w.s. .S.e.t.u.p" "$2/$boot/$bcd"; then
 				long="Windows Recovery Environment (loader)"
 			else
 				long="Windows Vista (loader)"
Index: b/os-probes/mounted/x86/83haiku
===================================================================
--- a/os-probes/mounted/x86/83haiku
+++ b/os-probes/mounted/x86/83haiku
@@ -13,7 +13,7 @@ case "$type" in
 	*) debug "$partition is not a BeFS partition: exiting"; exit 1 ;;
 esac
 
-if head -c 512 "$partition" | grep -qs "system.haiku_loader"; then
+if head -c 512 "$partition" | grep -aqs "system.haiku_loader"; then
 	debug "Stage 1 bootloader found"
 else
 	debug "Stage 1 bootloader not found: exiting"