Mageia Bugzilla – Attachment 7729 Details for
Bug 18271
Grub2 Installer does not recognize my OpenBSD installation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
New Account
|
Forgot Password
/lib/os-probes/mounted/91bsd
91bsd (text/plain), 848 bytes, created by
Elmar Stellnberger
on 2016-05-01 13:43:44 CEST
(
hide
)
Description:
/lib/os-probes/mounted/91bsd
Filename:
MIME Type:
Creator:
Elmar Stellnberger
Created:
2016-05-01 13:43:44 CEST
Size:
848 bytes
patch
obsolete
>#!/bin/sh ># Attempt to check if OpenBSD is installed in this system by ># looking for the copyright string in the kernel image, /bsd. > >set -e > >. /usr/share/os-prober/common.sh > >partition="$1" >dir="$2" >type="$3" > >[ "$type" == "ufs" ] || exit 1; > ># We need to re-mount the FS with ufstype=44bsd. >where=`mount | awk '($1 == "'$partition'") { print $3; }'` > >#echo "** #$partition#$dir#$type#$where#" >&2 >if [[ -n "$where" ]]; then > umount $where >else > where="$dir" >fi > >mount -t ufs -o ro,ufstype=44bsd $partition $where 2>/dev/null || exit 1; > >OPENBSD_COPYRIGHT='^Copyright (c) 1995-[12][0-9][0-9][0-9] OpenBSD.[ \t]*All rights reserved.[ \t]*http://www.OpenBSD.org$' >if [ -f "$where/bsd" ] && grep -qU "${OPENBSD_COPYRIGHT}" $where/bsd; then > label="$(count_next_label OpenBSD)" > result "$partition:OpenBSD:$label:chain" > exit 0 >else > exit 1 >fi
#!/bin/sh # Attempt to check if OpenBSD is installed in this system by # looking for the copyright string in the kernel image, /bsd. set -e . /usr/share/os-prober/common.sh partition="$1" dir="$2" type="$3" [ "$type" == "ufs" ] || exit 1; # We need to re-mount the FS with ufstype=44bsd. where=`mount | awk '($1 == "'$partition'") { print $3; }'` #echo "** #$partition#$dir#$type#$where#" >&2 if [[ -n "$where" ]]; then umount $where else where="$dir" fi mount -t ufs -o ro,ufstype=44bsd $partition $where 2>/dev/null || exit 1; OPENBSD_COPYRIGHT='^Copyright (c) 1995-[12][0-9][0-9][0-9] OpenBSD.[ \t]*All rights reserved.[ \t]*http://www.OpenBSD.org$' if [ -f "$where/bsd" ] && grep -qU "${OPENBSD_COPYRIGHT}" $where/bsd; then label="$(count_next_label OpenBSD)" result "$partition:OpenBSD:$label:chain" exit 0 else exit 1 fi
View Attachment As Raw
Actions:
View
Attachments on
bug 18271
:
7701
|
7702
|
7703
|
7728
| 7729 |
7730