Author: Thomas Renninger <trenn@suse.de>

Create pen list include file from already downloaded iana file

This is needed for build services where you typically cannot download.


Index: ipmitool-1.8.18/lib/create_pen_list
===================================================================
--- ipmitool-1.8.18.orig/lib/create_pen_list	2018-09-25 13:32:46.000000000 +0200
+++ ipmitool-1.8.18/lib/create_pen_list	2018-09-26 09:09:10.543717017 +0200
@@ -71,5 +71,10 @@ parse_pen_list() {
       }'
 }
 
-echo "Generating IANA PEN list..."
-curl -# "$PENLIST_URL" | parse_pen_list > "$OUTFILE"
+if [ -r enterprise-numbers ];then
+    echo "Generating IANA PEN list from local file..."
+    cat enterprise-numbers | parse_pen_list > "$OUTFILE"
+else
+    echo "Generating IANA PEN list from iana downloaded file..."
+    curl -# "$PENLIST_URL" | parse_pen_list > "$OUTFILE"
+fi
