File tree Expand file tree Collapse file tree 2 files changed +19
-19
lines changed
Expand file tree Collapse file tree 2 files changed +19
-19
lines changed Original file line number Diff line number Diff line change @@ -17,6 +17,25 @@ FADUMP_APPEND_ARGS_SYS_NODE="/sys/kernel/fadump/bootargs_append"
1717# shellcheck disable=SC2034
1818FENCE_KDUMP_CONFIG_FILE=" /etc/sysconfig/fence_kdump"
1919
20+ # read the value of an environ variable from given environ file path
21+ #
22+ # The environment variable entries in /proc/[pid]/environ are separated
23+ # by null bytes instead of by spaces.
24+ #
25+ # $1: environment variable
26+ # $2: environ file path
27+ read_proc_environ_var ()
28+ {
29+ local _var=$1 _environ_path=$2
30+ sed -n -E " s/.*(^|\x00)${_var} =([^\x00]*).*/\2/p" < " $_environ_path "
31+ }
32+
33+ _OSBUILD_ENVIRON_PATH=' /proc/1/environ'
34+ _is_osbuild ()
35+ {
36+ [[ $( read_proc_environ_var container " $_OSBUILD_ENVIRON_PATH " ) == bwrap-osbuild ]]
37+ }
38+
2039is_uki ()
2140{
2241 local img
Original file line number Diff line number Diff line change @@ -1752,25 +1752,6 @@ reset_crashkernel_after_update()
17521752 done
17531753}
17541754
1755- # read the value of an environ variable from given environ file path
1756- #
1757- # The environment variable entries in /proc/[pid]/environ are separated
1758- # by null bytes instead of by spaces.
1759- #
1760- # $1: environment variable
1761- # $2: environ file path
1762- read_proc_environ_var ()
1763- {
1764- local _var=$1 _environ_path=$2
1765- sed -n -E " s/.*(^|\x00)${_var} =([^\x00]*).*/\2/p" < " $_environ_path "
1766- }
1767-
1768- _OSBUILD_ENVIRON_PATH=' /proc/1/environ'
1769- _is_osbuild ()
1770- {
1771- [[ $( read_proc_environ_var container " $_OSBUILD_ENVIRON_PATH " ) == bwrap-osbuild ]]
1772- }
1773-
17741755reset_crashkernel_for_installed_kernel ()
17751756{
17761757 local _installed_kernel
You can’t perform that action at this time.
0 commit comments