Mageia Bugzilla – Attachment 7728 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/60ufs-test
60ufs-tests (text/plain), 945 bytes, created by
Elmar Stellnberger
on 2016-05-01 13:41:01 CEST
(
hide
)
Description:
/lib/os-probes/60ufs-test
Filename:
MIME Type:
Creator:
Elmar Stellnberger
Created:
2016-05-01 13:41:01 CEST
Size:
945 bytes
patch
obsolete
>#!/bin/sh ># Sub-tests that require a mounted partition. > >. /usr/share/os-prober/common.sh > >if [ "x$1" = xbtrfs ]; then > exit 1; >else > partition="$1" > types="$(fs_type "$partition")" || types=NOT-DETECTED >fi > >if [ "$types" != "ufs" ]; then > exit 1 >else > type="ufs" >fi > >tmpmnt=/var/lib/os-prober/mount >if [ ! -d "$tmpmnt" ]; then > mkdir "$tmpmnt" >fi > >mounted= > >for test in /usr/lib/os-probes/mounted/*bsd; do > debug "running subtest $test" > if [ -f "$test" ] && [ -x "$test" ]; then > "$test" "$partition" "$tmpmnt" "$type"; > result=$? > while grep -q "^[^ ]*[ \t]\+$tmpmnt[ \t]" /proc/mounts; do > sleep 0.01; # otherwise unmounting would fail for any kernel/umount realted reason > umount "$tmpmnt" 2>/dev/null || { warn "failed to umount $tmpmnt"; sleep 0.2; } > done > if [[ $result -eq 0 ]]; then > debug "os found by subtest $test" > rmdir "$tmpmnt" > exit 0 > fi > fi >done > >rmdir "$tmpmnt" > ># No tests found anything. >exit 1 >
#!/bin/sh # Sub-tests that require a mounted partition. . /usr/share/os-prober/common.sh if [ "x$1" = xbtrfs ]; then exit 1; else partition="$1" types="$(fs_type "$partition")" || types=NOT-DETECTED fi if [ "$types" != "ufs" ]; then exit 1 else type="ufs" fi tmpmnt=/var/lib/os-prober/mount if [ ! -d "$tmpmnt" ]; then mkdir "$tmpmnt" fi mounted= for test in /usr/lib/os-probes/mounted/*bsd; do debug "running subtest $test" if [ -f "$test" ] && [ -x "$test" ]; then "$test" "$partition" "$tmpmnt" "$type"; result=$? while grep -q "^[^ ]*[ \t]\+$tmpmnt[ \t]" /proc/mounts; do sleep 0.01; # otherwise unmounting would fail for any kernel/umount realted reason umount "$tmpmnt" 2>/dev/null || { warn "failed to umount $tmpmnt"; sleep 0.2; } done if [[ $result -eq 0 ]]; then debug "os found by subtest $test" rmdir "$tmpmnt" exit 0 fi fi done rmdir "$tmpmnt" # No tests found anything. exit 1
View Attachment As Raw
Actions:
View
Attachments on
bug 18271
:
7701
|
7702
|
7703
| 7728 |
7729
|
7730