contrib: dracut: remove getargbool polyfill
It was originally released in dracut 008 in February 2011;
we can probably drop it now
Upstream-commit: 47a02e3972
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ahelenia Ziemiańska <nabijaczleweli@nabijaczleweli.xyz>
Closes #13291
This commit is contained in:
parent
1781ee703b
commit
1184df6b93
|
@ -2,20 +2,6 @@
|
||||||
# shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
|
|
||||||
command -v getarg >/dev/null || . /lib/dracut-lib.sh || . /usr/lib/dracut/modules.d/99base/dracut-lib.sh
|
command -v getarg >/dev/null || . /lib/dracut-lib.sh || . /usr/lib/dracut/modules.d/99base/dracut-lib.sh
|
||||||
command -v getargbool >/dev/null || {
|
|
||||||
# Compatibility with older Dracut versions.
|
|
||||||
# With apologies to the Dracut developers.
|
|
||||||
getargbool() {
|
|
||||||
_default="$1"; shift
|
|
||||||
! _b=$(getarg "$@") && [ -z "$_b" ] && _b="$_default"
|
|
||||||
if [ -n "$_b" ]; then
|
|
||||||
[ "$_b" = "0" ] && return 1
|
|
||||||
[ "$_b" = "no" ] && return 1
|
|
||||||
[ "$_b" = "off" ] && return 1
|
|
||||||
fi
|
|
||||||
return 0
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
TAB=" "
|
TAB=" "
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue