summarylogtreecommitdiffstats
path: root/os-prober-factor-out-logger.patch
diff options
context:
space:
mode:
authorlibrewish2021-09-12 20:30:34 +0530
committerlibrewish2021-09-12 20:30:34 +0530
commit752ceb29fd23a6c4cffbca9f65adad1cb53f4872 (patch)
treea41fd50e983356d81f724b91463f8855bae07d9a /os-prober-factor-out-logger.patch
parent5271f23d8ac140f2db82697b645c38a41ccc78ac (diff)
downloadaur-752ceb29fd23a6c4cffbca9f65adad1cb53f4872.tar.gz
add patches from opensuse
Diffstat (limited to 'os-prober-factor-out-logger.patch')
-rw-r--r--os-prober-factor-out-logger.patch107
1 files changed, 0 insertions, 107 deletions
diff --git a/os-prober-factor-out-logger.patch b/os-prober-factor-out-logger.patch
deleted file mode 100644
index 52cb7ceabb0..00000000000
--- a/os-prober-factor-out-logger.patch
+++ /dev/null
@@ -1,107 +0,0 @@
-Index: os-prober/common.sh
-===================================================================
---- os-prober.orig/common.sh
-+++ os-prober/common.sh
-@@ -62,10 +62,14 @@ cache_progname() {
- esac
- }
-
--log() {
-- cache_progname
-- logger -t "$progname" "$@"
--}
-+# fd_logger: bind value now, possibly after assigning default.
-+eval '
-+ log() {
-+ cache_progname
-+ echo "$progname: $@" 1>&'${fd_logger:=9}'
-+ }
-+'
-+export fd_logger # so subshells inherit current value by default
-
- error() {
- log "error: $@"
-@@ -81,10 +85,14 @@ debug() {
- fi
- }
-
--result () {
-- log "result:" "$@"
-- echo "$@"
--}
-+# fd_result: bind value now, possibly after assigning default.
-+eval '
-+ result() {
-+ log "result:" "$@"
-+ echo "$@" 1>&'${fd_result:=1}'
-+ }
-+'
-+export fd_result # so subshells inherit current value by default
-
- # shim to make it easier to use os-prober outside d-i
- if ! type mapdevfs >/dev/null 2>&1; then
-Index: os-prober/linux-boot-prober
-===================================================================
---- os-prober.orig/linux-boot-prober
-+++ os-prober/linux-boot-prober
-@@ -1,4 +1,12 @@
- #!/bin/sh
-+
-+# dash shell does not have "{varname}>&1" feature that bash shell has
-+# for auto-assignment of new filedescriptors.
-+# It is cumbersome to write the 'eval' to use our own variables in redirections.
-+# Therefore use fixed numbers.
-+export fd_result=3 # file descriptor for external results
-+export fd_logger=9 # file descriptor for input to logger
-+
- . /usr/share/os-prober/common.sh
-
- set -e
-@@ -19,6 +27,7 @@ bootuuid=
-
- grep "^/dev/" /proc/mounts | parse_proc_mounts >"$OS_PROBER_TMP/mounted-map" || true
-
-+( (
- if [ -z "$1" ]; then
- ERR=y
- elif [ "$1" = btrfs -a -z "$2" ]; then
-@@ -186,3 +195,5 @@ else
- fi
- fi
- fi
-+) 9>&1 | logger 1>&- # fd_logger
-+) 3>&1 # fd_result
-Index: os-prober/os-prober
-===================================================================
---- os-prober.orig/os-prober
-+++ os-prober/os-prober
-@@ -1,7 +1,14 @@
- #!/bin/sh
- set -e
-
--. /usr/share/os-prober/common.sh
-+# dash shell does not have "{varname}>&1" feature that bash shell has
-+# for auto-assignment of new filedescriptors.
-+# It is cumbersome to write the 'eval' to use our own variables in redirections.
-+# Therefore use fixed numbers.
-+export fd_result=3 # file descriptor for external results
-+export fd_logger=9 # file descriptor for input to logger
-+
-+ . /usr/share/os-prober/common.sh
-
- newns "$@"
- require_tmpdir
-@@ -136,6 +143,7 @@ fi
-
- : >"$OS_PROBER_TMP/btrfs-vols"
-
-+( (
- for partition in $(partitions); do
- if ! mapped="$(mapdevfs "$partition")"; then
- log "Device '$partition' does not exist; skipping"
-@@ -200,3 +208,5 @@ for partition in $(partitions); do
- fi
- fi
- done
-+) 9>&1 | logger 1>&- # fd_logger
-+) 3>&1 # fd_result