Login
Log in using an SSO provider:
Fedora Account System
Red Hat Associate
Red Hat Customer
Login using a Red Hat Bugzilla account
Forgot Password
Create an Account
Red Hat Bugzilla – Attachment 692170 Details for
Bug 875356
OS prober is slow
Home
New
Search
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh90 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
[?]
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
0001-Allow-relocation-of-tree-of-scripts.patch
0001-Allow-relocation-of-tree-of-scripts.patch (text/plain), 12.03 KB, created by
John Reiser
on 2013-02-03 01:54:54 UTC
(
hide
)
Description:
0001-Allow-relocation-of-tree-of-scripts.patch
Filename:
MIME Type:
Creator:
John Reiser
Created:
2013-02-03 01:54:54 UTC
Size:
12.03 KB
patch
obsolete
>From 5f32f86fa03f8c5f64ea257ae185d0396e54aaf3 Mon Sep 17 00:00:00 2001 >From: John Reiser <jreiser@BitWagon.com> >Date: Sat, 2 Feb 2013 15:53:25 -0800 >Subject: [PATCH 1/3] Allow relocation of tree of scripts. > >--- > linux-boot-prober | 13 ++++++++++--- > linux-boot-probes/common/50mounted-tests | 4 ++-- > linux-boot-probes/mounted/common/40grub2 | 2 +- > linux-boot-probes/mounted/common/90fallback | 2 +- > linux-boot-probes/mounted/powerpc/40yaboot | 2 +- > linux-boot-probes/mounted/sparc/50silo | 2 +- > linux-boot-probes/mounted/x86/40grub | 2 +- > linux-boot-probes/mounted/x86/50lilo | 2 +- > os-prober | 14 ++++++++++---- > os-probes/common/50mounted-tests | 4 ++-- > os-probes/mounted/common/40lsb | 2 +- > os-probes/mounted/common/90linux-distro | 2 +- > os-probes/mounted/m68k/10macos6-9 | 2 +- > os-probes/mounted/powerpc/10macos6-9 | 2 +- > os-probes/mounted/powerpc/20macosx | 2 +- > os-probes/mounted/sparc/80solaris | 2 +- > os-probes/mounted/x86/10freedos | 2 +- > os-probes/mounted/x86/10qnx | 2 +- > os-probes/mounted/x86/20microsoft | 2 +- > os-probes/mounted/x86/30utility | 2 +- > os-probes/mounted/x86/70hurd | 2 +- > os-probes/mounted/x86/80minix | 2 +- > os-probes/mounted/x86/83haiku | 2 +- > os-probes/mounted/x86/90solaris | 2 +- > 24 files changed, 44 insertions(+), 31 deletions(-) > >diff --git a/linux-boot-prober b/linux-boot-prober >index e32dc84..6953430 100755 >--- a/linux-boot-prober >+++ b/linux-boot-prober >@@ -1,5 +1,12 @@ > #!/bin/sh >-. /usr/share/os-prober/common.sh >+ >+# $2: optional alternate root for scripts in this package >+# (for testing without install, etc.) >+# Use the default directories if $2 is not supplied. >+export execpfx="${2:-/usr/share/os-prober}" >+export libexecpfx="${2:-/usr/libexec}/linux-boot-probes" >+ >+. $execpfx/common.sh > > set -e > >@@ -21,7 +28,7 @@ if ! mapped="$(mapdevfs "$partition")"; then > fi > > if ! grep -q "^$mapped " "$OS_PROBER_TMP/mounted-map"; then >- for test in /usr/lib/linux-boot-probes/*; do >+ for test in $libexecpfx/*; do > debug "running $test" > if [ -x $test ] && [ -f $test ]; then > if $test "$partition"; then >@@ -43,7 +50,7 @@ else > bootpart="$partition" > bootmounted=0 > fi >- for test in /usr/lib/linux-boot-probes/mounted/*; do >+ for test in $libexecpfx/mounted/*; do > if [ -f $test ] && [ -x $test ]; then > debug "running $test on mounted $partition" > if $test "$partition" "$bootpart" "$mpoint" "$type"; then >diff --git a/linux-boot-probes/common/50mounted-tests b/linux-boot-probes/common/50mounted-tests >index 41e26e6..77b4230 100755 >--- a/linux-boot-probes/common/50mounted-tests >+++ b/linux-boot-probes/common/50mounted-tests >@@ -1,6 +1,6 @@ > #!/bin/sh > # Sub-tests that require a mounted partition. >-. /usr/share/os-prober/common.sh >+. $execpfx/common.sh > set -e > > partition="$1" >@@ -55,7 +55,7 @@ if [ "$mounted" ]; then > bootpart="${mountboot%% *}" > mounted="${mountboot#* }" > >- for test in /usr/lib/linux-boot-probes/mounted/*; do >+ for test in $libexecpfx/mounted/*; do > if [ -f "$test" ] && [ -x "$test" ]; then > debug "running $test $partition $bootpart $tmpmnt $type" > if $test "$partition" "$bootpart" "$tmpmnt" "$type"; then >diff --git a/linux-boot-probes/mounted/common/40grub2 b/linux-boot-probes/mounted/common/40grub2 >index 885614e..81935dc 100755 >--- a/linux-boot-probes/mounted/common/40grub2 >+++ b/linux-boot-probes/mounted/common/40grub2 >@@ -1,5 +1,5 @@ > #!/bin/sh >-. /usr/share/os-prober/common.sh >+. $execpfx/common.sh > set -e > > partition="$1" >diff --git a/linux-boot-probes/mounted/common/90fallback b/linux-boot-probes/mounted/common/90fallback >index 9ff78e1..16e239c 100755 >--- a/linux-boot-probes/mounted/common/90fallback >+++ b/linux-boot-probes/mounted/common/90fallback >@@ -1,7 +1,7 @@ > #!/bin/sh > # Fallback in case nothing else works. Look for vmlinu[xz] file in root and > # /boot, see if there is a matching initrd, and wing it. >-. /usr/share/os-prober/common.sh >+. $execpfx/common.sh > set -e > > partition="$1" >diff --git a/linux-boot-probes/mounted/powerpc/40yaboot b/linux-boot-probes/mounted/powerpc/40yaboot >index 26d8a16..7930d9b 100755 >--- a/linux-boot-probes/mounted/powerpc/40yaboot >+++ b/linux-boot-probes/mounted/powerpc/40yaboot >@@ -1,5 +1,5 @@ > #!/bin/sh >-. /usr/share/os-prober/common.sh >+. $execpfx/common.sh > set -e > > partition="$1" >diff --git a/linux-boot-probes/mounted/sparc/50silo b/linux-boot-probes/mounted/sparc/50silo >index bb5c41c..7a47ae3 100755 >--- a/linux-boot-probes/mounted/sparc/50silo >+++ b/linux-boot-probes/mounted/sparc/50silo >@@ -1,5 +1,5 @@ > #!/bin/sh >-. /usr/share/os-prober/common.sh >+. $execpfx/common.sh > set -e > > partition="$1" >diff --git a/linux-boot-probes/mounted/x86/40grub b/linux-boot-probes/mounted/x86/40grub >index 08f6605..cd38a21 100755 >--- a/linux-boot-probes/mounted/x86/40grub >+++ b/linux-boot-probes/mounted/x86/40grub >@@ -1,5 +1,5 @@ > #!/bin/sh >-. /usr/share/os-prober/common.sh >+. $execpfx/common.sh > set -e > > partition="$1" >diff --git a/linux-boot-probes/mounted/x86/50lilo b/linux-boot-probes/mounted/x86/50lilo >index a011b56..cd16d7b 100755 >--- a/linux-boot-probes/mounted/x86/50lilo >+++ b/linux-boot-probes/mounted/x86/50lilo >@@ -1,5 +1,5 @@ > #!/bin/sh >-. /usr/share/os-prober/common.sh >+. $execpfx/common.sh > set -e > > partition="$1" >diff --git a/os-prober b/os-prober >index 2a08736..1a8ebf7 100755 >--- a/os-prober >+++ b/os-prober >@@ -1,7 +1,13 @@ > #!/bin/sh > set -e > >-. /usr/share/os-prober/common.sh >+# $1: optional alternate root for scripts in this package >+# (for testing without install, etc.) >+# Use the default directories if $1 is not supplied. >+export execpfx="${1:-/usr/share/os-prober}" >+export libexecpfx="${1:-/usr/libexec}/os-probes" >+ >+. $execpfx/common.sh > > newns "$@" > require_tmpdir >@@ -101,7 +107,7 @@ parse_proc_mdstat () { > # Needed for idempotency > rm -f /var/lib/os-prober/labels > >-for prog in /usr/lib/os-probes/init/*; do >+for prog in $libexecpfx/init/*; do > if [ -x "$prog" ] && [ -f "$prog" ]; then > "$prog" || true > fi >@@ -138,7 +144,7 @@ for partition in $(partitions); do > fi > > if ! grep -q "^$mapped " "$OS_PROBER_TMP/mounted-map" ; then >- for test in /usr/lib/os-probes/*; do >+ for test in $libexecpfx/*; do > if [ -f "$test" ] && [ -x "$test" ]; then > debug "running $test on $partition" > if "$test" "$partition"; then >@@ -152,7 +158,7 @@ for partition in $(partitions); do > mpoint="$(unescape_mount "$mpoint")" > if [ "$mpoint" != "/target/boot" ] && [ "$mpoint" != "/target" ] && [ "$mpoint" != "/" ]; then > type=$(grep "^$mapped " "$OS_PROBER_TMP/mounted-map" | head -n1 | cut -d " " -f 3) >- for test in /usr/lib/os-probes/mounted/*; do >+ for test in $libexecpfx/mounted/*; do > if [ -f "$test" ] && [ -x "$test" ]; then > debug "running $test on mounted $partition" > if "$test" "$partition" "$mpoint" "$type"; then >diff --git a/os-probes/common/50mounted-tests b/os-probes/common/50mounted-tests >index 561163b..4cf78fa 100755 >--- a/os-probes/common/50mounted-tests >+++ b/os-probes/common/50mounted-tests >@@ -3,7 +3,7 @@ > set -e > partition="$1" > >-. /usr/share/os-prober/common.sh >+. $execpfx/common.sh > > types="$(fs_type "$partition")" || types=NOT-DETECTED > if [ "$types" = NOT-DETECTED ]; then >@@ -69,7 +69,7 @@ else > fi > > if [ "$mounted" ]; then >- for test in /usr/lib/os-probes/mounted/*; do >+ for test in $libexecpfx/mounted/*; do > debug "running subtest $test" > if [ -f "$test" ] && [ -x "$test" ]; then > if "$test" "$partition" "$tmpmnt" "$type"; then >diff --git a/os-probes/mounted/common/40lsb b/os-probes/mounted/common/40lsb >index ce8d4e1..2bc99a2 100755 >--- a/os-probes/mounted/common/40lsb >+++ b/os-probes/mounted/common/40lsb >@@ -2,7 +2,7 @@ > # Test for LSB systems. > set -e > >-. /usr/share/os-prober/common.sh >+. $execpfx/common.sh > > partition="$1" > dir="$2" >diff --git a/os-probes/mounted/common/90linux-distro b/os-probes/mounted/common/90linux-distro >index 6678f22..4cafea5 100755 >--- a/os-probes/mounted/common/90linux-distro >+++ b/os-probes/mounted/common/90linux-distro >@@ -2,7 +2,7 @@ > # Test for linux distributions. > set -e > >-. /usr/share/os-prober/common.sh >+. $execpfx/common.sh > > partition="$1" > dir="$2" >diff --git a/os-probes/mounted/m68k/10macos6-9 b/os-probes/mounted/m68k/10macos6-9 >index 646c7a7..acd08ad 100755 >--- a/os-probes/mounted/m68k/10macos6-9 >+++ b/os-probes/mounted/m68k/10macos6-9 >@@ -1,6 +1,6 @@ > #!/bin/sh > # Probe for OS 9 via System suitcase check. >-. /usr/share/os-prober/common.sh >+. $execpfx/common.sh > > set -e > >diff --git a/os-probes/mounted/powerpc/10macos6-9 b/os-probes/mounted/powerpc/10macos6-9 >index 2415a04..75422f2 100755 >--- a/os-probes/mounted/powerpc/10macos6-9 >+++ b/os-probes/mounted/powerpc/10macos6-9 >@@ -1,6 +1,6 @@ > #!/bin/sh > # Probe for OS 9 via System suitcase check. >-. /usr/share/os-prober/common.sh >+. $execpfx/common.sh > > set -e > >diff --git a/os-probes/mounted/powerpc/20macosx b/os-probes/mounted/powerpc/20macosx >index dd4207f..97af0d2 100755 >--- a/os-probes/mounted/powerpc/20macosx >+++ b/os-probes/mounted/powerpc/20macosx >@@ -1,6 +1,6 @@ > #!/bin/sh -e > # Detects Mac OS X. I don't yet know how Mac OS <= 9 fits into this. >-. /usr/share/os-prober/common.sh >+. $execpfx/common.sh > > partition="$1" > mpoint="$2" >diff --git a/os-probes/mounted/sparc/80solaris b/os-probes/mounted/sparc/80solaris >index 8fbe34c..72ed959 100755 >--- a/os-probes/mounted/sparc/80solaris >+++ b/os-probes/mounted/sparc/80solaris >@@ -4,7 +4,7 @@ > > set -e > >-. /usr/share/os-prober/common.sh >+. $execpfx/common.sh > > partition="$1" > dir="$2" >diff --git a/os-probes/mounted/x86/10freedos b/os-probes/mounted/x86/10freedos >index 94388f3..a859960 100755 >--- a/os-probes/mounted/x86/10freedos >+++ b/os-probes/mounted/x86/10freedos >@@ -1,6 +1,6 @@ > #!/bin/sh > >-. /usr/share/os-prober/common.sh >+. $execpfx/common.sh > > partition="$1" > mpoint="$2" >diff --git a/os-probes/mounted/x86/10qnx b/os-probes/mounted/x86/10qnx >index 8d40398..52a8c45 100755 >--- a/os-probes/mounted/x86/10qnx >+++ b/os-probes/mounted/x86/10qnx >@@ -1,6 +1,6 @@ > #!/bin/sh > >-. /usr/share/os-prober/common.sh >+. $execpfx/common.sh > > partition="$1" > mpoint="$2" >diff --git a/os-probes/mounted/x86/20microsoft b/os-probes/mounted/x86/20microsoft >index 644d63c..24b001a 100755 >--- a/os-probes/mounted/x86/20microsoft >+++ b/os-probes/mounted/x86/20microsoft >@@ -1,7 +1,7 @@ > #!/bin/sh > # Detects all Microsoft OSes on a collection of partitions. > >-. /usr/share/os-prober/common.sh >+. $execpfx/common.sh > > partition="$1" > mpoint="$2" >diff --git a/os-probes/mounted/x86/30utility b/os-probes/mounted/x86/30utility >index af48d30..22034e3 100755 >--- a/os-probes/mounted/x86/30utility >+++ b/os-probes/mounted/x86/30utility >@@ -1,7 +1,7 @@ > #!/bin/sh > # Detects utility (hw vendor recovery) partitions. > >-. /usr/share/os-prober/common.sh >+. $execpfx/common.sh > > partition="$1" > mpoint="$2" >diff --git a/os-probes/mounted/x86/70hurd b/os-probes/mounted/x86/70hurd >index ffc0a44..75fce39 100755 >--- a/os-probes/mounted/x86/70hurd >+++ b/os-probes/mounted/x86/70hurd >@@ -1,7 +1,7 @@ > #!/bin/sh > set -e > >-. /usr/share/os-prober/common.sh >+. $execpfx/common.sh > > partition="$1" > dir="$2" >diff --git a/os-probes/mounted/x86/80minix b/os-probes/mounted/x86/80minix >index e01f669..a0af211 100755 >--- a/os-probes/mounted/x86/80minix >+++ b/os-probes/mounted/x86/80minix >@@ -1,7 +1,7 @@ > #!/bin/sh > set -e > >-. /usr/share/os-prober/common.sh >+. $execpfx/common.sh > > partition="$1" > dir="$2" >diff --git a/os-probes/mounted/x86/83haiku b/os-probes/mounted/x86/83haiku >index 6de7a1d..8c39535 100755 >--- a/os-probes/mounted/x86/83haiku >+++ b/os-probes/mounted/x86/83haiku >@@ -1,7 +1,7 @@ > #!/bin/sh > # Detects Haiku on BeFS partitions. > >-. /usr/share/os-prober/common.sh >+. $execpfx/common.sh > > partition="$1" > mpoint="$2" >diff --git a/os-probes/mounted/x86/90solaris b/os-probes/mounted/x86/90solaris >index 0e9148c..e3518ff 100755 >--- a/os-probes/mounted/x86/90solaris >+++ b/os-probes/mounted/x86/90solaris >@@ -4,7 +4,7 @@ > > set -e > >-. /usr/share/os-prober/common.sh >+. $execpfx/common.sh > > partition="$1" > dir="$2" >-- >1.8.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 875356
:
652201
|
688069
|
689262
|
689263
|
689264
|
689265
| 692170 |
692171
|
692172