dracut/autoinstaller: fix kcl parsing

regression caused by fce4ed6420
This commit is contained in:
classabbyamp 2023-05-20 15:55:51 -04:00
parent fce4ed6420
commit b5e8502717
No known key found for this signature in database
GPG Key ID: 6BE0755918A4C7F5
1 changed files with 10 additions and 18 deletions

View File

@ -1,18 +1,6 @@
#!/bin/sh
set -e
# These are for all you erroring dracuts out there
VAI_getarg() {
set +e
getarg "$@"
set -e
}
VAI_getargbool() {
set +e
getargbool "$@"
set -e
}
type getargbool >/dev/null 2>&1 || . /lib/dracut-lib.sh
# These functions pulled from void's excellent mklive.sh
VAI_info_msg() {
@ -224,10 +212,13 @@ VAI_configure_autoinstall() {
esac
# --------------- Pull config URL out of kernel cmdline -------------------------
if VAI_getargbool 0 autourl ; then
xbps-uhelper fetch "$(VAI_getarg autourl)>/etc/autoinstall.cfg"
set +e
if getargbool 0 autourl ; then
set -e
xbps-uhelper fetch "$(getarg autourl)>/etc/autoinstall.cfg"
else
set -e
mv /etc/autoinstall.default /etc/autoinstall.cfg
fi
@ -300,9 +291,10 @@ VAI_main() {
}
# If we are using the autoinstaller, launch it
if VAI_getargbool 0 auto ; then
if getargbool 0 auto ; then
set -e
VAI_main
# Very important to release this before returning to dracut code
set +e
fi
# Very important to release this before returning to dracut code
set +e