The function is only used in kdumpctl. Thus move it there to keep
kdump-lib small and simple.
Signed-off-by: Philipp Rudo <prudo(a)redhat.com>
---
kdump-lib.sh | 19 -------------------
kdumpctl | 19 +++++++++++++++++++
2 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/kdump-lib.sh b/kdump-lib.sh
index 495994f..9d110ab 100755
--- a/kdump-lib.sh
+++ b/kdump-lib.sh
@@ -309,25 +309,6 @@ get_nmcli_value_by_field()
LANG=C nmcli --get-values "$@"
}
-# returns 0 when omission of a module is desired in dracut_args
-# returns 1 otherwise
-is_dracut_mod_omitted()
-{
- local dracut_args dracut_mod=$1
-
- set -- $(kdump_get_conf_val dracut_args)
- while [ $# -gt 0 ]; do
- case $1 in
- -o | --omit)
- [[ " ${2//[^[:alnum:]]/ } " == *" $dracut_mod "* ]] &&
return 0
- ;;
- esac
- shift
- done
-
- return 1
-}
-
is_wdt_active()
{
local active
diff --git a/kdumpctl b/kdumpctl
index 2bec428..ee711ac 100755
--- a/kdumpctl
+++ b/kdumpctl
@@ -45,6 +45,25 @@ if ! dlog_init; then
exit 1
fi
+# returns 0 when omission of a module is desired in dracut_args
+# returns 1 otherwise
+is_dracut_mod_omitted()
+{
+ local dracut_args dracut_mod=$1
+
+ set -- $(kdump_get_conf_val dracut_args)
+ while [ $# -gt 0 ]; do
+ case $1 in
+ -o | --omit)
+ [[ " ${2//[^[:alnum:]]/ } " == *" $dracut_mod "* ]] &&
return 0
+ ;;
+ esac
+ shift
+ done
+
+ return 1
+}
+
single_instance_lock()
{
local rc timeout=5 lockfile
--
2.39.2