From 87b1945a66839953498cd0028e9cf3a714e35c9d Mon Sep 17 00:00:00 2001 From: Anil Madhavapeddy Date: Tue, 12 Jan 2016 10:21:17 +0000 Subject: [PATCH] Remove `nat-script.sh` from the scripts directory, to be available as an external script since it is GPLv2 licensed. --- CHANGES.md | 3 + scripts/nat-script.sh | 134 ------------------------------------------ 2 files changed, 3 insertions(+), 134 deletions(-) delete mode 100755 scripts/nat-script.sh diff --git a/CHANGES.md b/CHANGES.md index fdc122ec5..f68b13dfd 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -31,6 +31,9 @@ let my_functor = `My_functor.start` will now take an extra argument for each dependencies. In the case of nocrypto, this is `()`. +* Remove `nat-script.sh` from the scripts directory, to be available + as an external script. + ### 2.6.1 (2015-09-08) * Xen: improve the .xl file generation. We now have diff --git a/scripts/nat-script.sh b/scripts/nat-script.sh deleted file mode 100755 index 89e2e6080..000000000 --- a/scripts/nat-script.sh +++ /dev/null @@ -1,134 +0,0 @@ -#!/bin/sh -# -# Copyright IBM, Corp. 2010 -# -# Authors: -# Anthony Liguori -# -# This work is licensed under the terms of the GNU GPL, version 2. See -# the COPYING file in the top-level directory. - -# Set to the name of your bridge -BRIDGE=xenbr0 - -# Network information -NETWORK=192.168.53.0 -NETMASK=255.255.255.0 -GATEWAY=192.168.53.1 -DHCPRANGE=192.168.53.2,192.168.53.254 - -# Optionally parameters to enable PXE support -TFTPROOT= -BOOTP= - -do_brctl() { - brctl "$@" -} - -do_ifconfig() { - ifconfig "$@" -} - -do_dd() { - dd "$@" -} - -do_iptables_restore() { - iptables-restore "$@" -} - -do_dnsmasq() { - dnsmasq "$@" -} - -check_bridge() { - if do_brctl show | grep "^$1" > /dev/null 2> /dev/null; then - return 1 - else - return 0 - fi -} - -create_bridge() { - do_brctl addbr "$1" - do_brctl stp "$1" off - do_brctl setfd "$1" 0 - do_ifconfig "$1" "$GATEWAY" netmask "$NETMASK" up -} - -enable_ip_forward() { - echo 1 | do_dd of=/proc/sys/net/ipv4/ip_forward > /dev/null -} - -add_filter_rules() { -do_iptables_restore <