Add parameters to setup network
Change-Id: I3a5f52f9df396e70456e511509dfdd27e25a8bc7 Signed-off-by: Guo Ruijing <ruijing.guo@intel.com>
This commit is contained in:
parent
6e3f8973df
commit
a8359af0ca
|
@ -1,8 +1,34 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
HTTP_PROXY=http://10.19.8.225:911
|
|
||||||
DNS_SERVER=10.248.2.1
|
HTTP_PROXY=${HTTP_PROXY:-http://10.19.8.225:911}
|
||||||
SOCK5_IP=10.7.211.16
|
DNS_SERVER=${DNS_SERVER:-10.248.2.1}
|
||||||
SOCK5_PORT=1080
|
SOCKS5_IP=${SOCKS5_IP:-10.7.211.16}
|
||||||
|
SOCKS5_PORT=${SOCKS5:-1080}
|
||||||
|
|
||||||
|
for i in "$@"
|
||||||
|
do
|
||||||
|
case $i in
|
||||||
|
-h=*|--http=*)
|
||||||
|
HTTP_PROXY="${i#*=}"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-d=*|--dns=*)
|
||||||
|
DNS_SERVER="${i#*=}"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-s=*|--socks5-ip=*)
|
||||||
|
SOCKS5_IP="${i#*=}"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
-p=*|--socks5-port=*)
|
||||||
|
SOCKS5_PORT="${i#*=}"
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
# unknown option
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
cat <<EOF | sudo tee /etc/apt/apt.conf
|
cat <<EOF | sudo tee /etc/apt/apt.conf
|
||||||
Acquire::http::Proxy "$HTTP_PROXY";
|
Acquire::http::Proxy "$HTTP_PROXY";
|
||||||
|
@ -23,8 +49,8 @@ base {
|
||||||
redsocks {
|
redsocks {
|
||||||
local_ip = 0.0.0.0;
|
local_ip = 0.0.0.0;
|
||||||
local_port = 6666;
|
local_port = 6666;
|
||||||
ip = $SOCK5_IP;
|
ip = $SOCKS5_IP;
|
||||||
port = $SOCK5_PORT;
|
port = $SOCKS5_PORT;
|
||||||
type = socks5;
|
type = socks5;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ d. SOCK5_PORT: socks5 proxy for fuel VM
|
||||||
|
|
||||||
In fresh installation, 01_setup_network.sh can be run by:
|
In fresh installation, 01_setup_network.sh can be run by:
|
||||||
|
|
||||||
curl --socks5 <socks5 proxy> https://raw.githubusercontent.com/openstack/fuel-plugin-ovs/master/demo/01_setup_network.sh | bash
|
curl --socks5 <socks5-proxy> https://raw.githubusercontent.com/openstack/fuel-plugin-ovs/master/demo/01_setup_network.sh | bash -s -- -h=<http-proxy>-d=<dns-server> -s=<socks5-ip> -p=<socks5-port>
|
||||||
|
|
||||||
2. 02_install_packages.sh
|
2. 02_install_packages.sh
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue