From dfc0db0a092fe0e7615573a8573ba7c8a4df1a31 Mon Sep 17 00:00:00 2001 From: "M. Vefa Bicakci" Date: Sun, 10 Apr 2016 00:00:00 -0400 Subject: [PATCH] anaconda: Do not fail during initramfs start-up due to missing url-lib --- anaconda/dracut/anaconda-ks-sendheaders.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/anaconda/dracut/anaconda-ks-sendheaders.sh b/anaconda/dracut/anaconda-ks-sendheaders.sh index 7bc9739..39fa0ce 100755 --- a/anaconda/dracut/anaconda-ks-sendheaders.sh +++ b/anaconda/dracut/anaconda-ks-sendheaders.sh @@ -2,7 +2,15 @@ # anaconda-ks-sendheaders.sh - set various HTTP headers for kickstarting [ -f /tmp/.ks_sendheaders ] && return -command -v set_http_header >/dev/null || . /lib/url-lib.sh + +if ! command -v set_http_header >/dev/null; then + if ! [ -r /lib/url-lib.sh ]; then + alias set_http_header=: + return + fi + + . /lib/url-lib.sh +fi # inst.ks.sendmac: send MAC addresses in HTTP headers if getargbool 0 kssendmac inst.ks.sendmac; then