From: davidplunkett Date: Sat, 30 Mar 2019 03:51:03 +0000 (+0000) Subject: ignore proxy for local curl commands X-Git-Tag: 1.0.0~11 X-Git-Url: https://gerrit.akraino.org/r/gitweb?a=commitdiff_plain;h=refs%2Fchanges%2F30%2F530%2F1;p=redfish.git ignore proxy for local curl commands Change-Id: I7a3595b7848bdd306d4a1e328f0782a3aacd8e73 Signed-off-by: davidplunkett --- diff --git a/install_server_os.sh b/install_server_os.sh index 452c341..078f460 100755 --- a/install_server_os.sh +++ b/install_server_os.sh @@ -165,7 +165,7 @@ if ! ping -c 3 $SRV_OOB_IP | grep time= ; then fi ## COLLECT ANY ADDITIONAL SERVER DATA NEEDED - FOR EXAMPLE, LOOKUP MAC FOR DELL NIC -SRV_OEM=$(curl --insecure https://$SRV_OOB_IP/redfish/v1/ | grep -Poe '(?<="Oem":{")[^"]*(?=")') +SRV_OEM=$(curl --noproxy '*' --insecure https://$SRV_OOB_IP/redfish/v1/ | grep -Poe '(?<="Oem":{")[^"]*(?=")') echo "Identified server as OEM [$SRV_OEM] using oob [$SRV_OOB_IP]" case $SRV_OEM in Dell) @@ -242,7 +242,7 @@ echo "Starting web server using folder [$WEB_ROOT] on port [$BUILD_WEBPORT]" docker stop akraino-httpboot &> /dev/null docker rm akraino-httpboot &> /dev/null docker run -dit --name akraino-httpboot -p $BUILD_WEBPORT:80 -v "$WEB_ROOT":/usr/local/apache2/htdocs/ httpd:alpine >/dev/null && sleep 5 -if ! docker ps | grep akraino-httpboot >/dev/null || ! curl http://localhost:$BUILD_WEBPORT/ &>/dev/null ; then +if ! docker ps | grep akraino-httpboot >/dev/null || ! curl --noproxy '*' http://localhost:$BUILD_WEBPORT/ &>/dev/null ; then echo "ERROR: Failed to start web server using folder [$WEB_ROOT] and port [$BUILD_WEBPORT]" ls -l $WEB_ROOT docker run -it --name akraino-httpboot -p $BUILD_WEBPORT:80 -v "$WEB_ROOT":/usr/local/apache2/htdocs/ httpd:alpine 2>&1 diff --git a/ubuntu.seed.template b/ubuntu.seed.template index a10cb87..22f1577 100644 --- a/ubuntu.seed.template +++ b/ubuntu.seed.template @@ -165,8 +165,8 @@ d-i preseed/late_command string \ in-target /bin/bash -c 'echo -n -e " bond-miimon 100\n bond-slaves @@SRV_SLAVE1@@ @@SRV_SLAVE2@@\n mtu @@SRV_MTU@@\n\n" >> /etc/network/interfaces'; \ in-target /bin/bash -c 'echo -n -e "auto @@SRV_BOND@@.@@SRV_VLAN@@\niface @@SRV_BOND@@.@@SRV_VLAN@@ inet static\n address @@SRV_IP@@\n netmask @@SRV_NETMASK@@\n" >> /etc/network/interfaces'; \ in-target /bin/bash -c 'echo -n -e " gateway @@SRV_GATEWAY@@\n dns-nameservers @@SRV_DNS@@\n dns-search @@SRV_DNSSEARCH@@\n vlan-raw-device @@SRV_BOND@@\n mtu @@SRV_MTU@@\n" >> /etc/network/interfaces'; \ - in-target /bin/bash -c 'curl http://@@BUILD_WEBIP@@:@@BUILD_WEBPORT@@/sources.list > /etc/apt/sources.list'; \ - in-target /bin/bash -c 'curl http://@@BUILD_WEBIP@@:@@BUILD_WEBPORT@@/@@SRV_NAME@@.firstboot.sh > /root/@@SRV_NAME@@.firstboot.sh; chmod +x /root/@@SRV_NAME@@.firstboot.sh'; + in-target /bin/bash -c 'curl --noproxy "*" http://@@BUILD_WEBIP@@:@@BUILD_WEBPORT@@/sources.list > /etc/apt/sources.list'; \ + in-target /bin/bash -c 'curl --noproxy "*" http://@@BUILD_WEBIP@@:@@BUILD_WEBPORT@@/@@SRV_NAME@@.firstboot.sh > /root/@@SRV_NAME@@.firstboot.sh; chmod +x /root/@@SRV_NAME@@.firstboot.sh'; ### Finish # Reboot after the install is finished.