From ba5f16def639f349f732e3f0837e86d60a1f5c26 Mon Sep 17 00:00:00 2001 From: Conrad Parker Date: Sun, 20 Apr 2008 21:50:33 +0900 Subject: [PATCH] remove hardcoded networking options --- build-guest | 22 ++-------------------- distros/debian | 2 +- distros/gentoo | 2 +- distros/ubuntu | 2 +- initU.d/initU-debian | 18 ------------------ 5 files changed, 5 insertions(+), 41 deletions(-) diff --git a/build-guest b/build-guest index 54d4564..aee6f44 100755 --- a/build-guest +++ b/build-guest @@ -17,18 +17,6 @@ DISTRO="debian" # Default release to install (blank for per-distro default) RELEASE="" -# Default IP address -IP="10.1.0.100" - -# Default netmask -NETMASK="255.255.0.0" - -# Default gateway -GATEWAY="10.0.0.1" - -# Default nameserver -NAMESERVER="10.0.0.1" - # Loop device LOOP=$(losetup -f) @@ -79,19 +67,13 @@ usage () { echo >&2 " -s swap, --swap swap Specify swap device or filename" echo >&2 " -S size, --swap-size size Set the swap size (MB)" echo >&2 - echo >&2 "Xen options" + echo >&2 "Virtualization options" echo >&2 " -c, --console Create a running instance of the domain, and" echo >&2 " attach to its console" echo >&2 " --create Create a running instance of the domain" echo >&2 - echo >&2 "Networking options" - echo >&2 " -I, --ip address Set the IP address" - echo >&2 " -N, --netmask address Set the netmask" - echo >&2 " -G, --gateway address Set the gateway" - echo >&2 " -D, --nameserver address Set the DNS nameserver address" - echo >&2 echo >&2 "Removal options" - echo >&2 " -p, --purge Purge the filesystems and config for DomName" + echo >&2 " -p, --purge Purge the filesystems and config for hostname" echo >&2 echo >&2 "Miscellaneous options" echo >&2 " -h, --help Display this help and exit" diff --git a/distros/debian b/distros/debian index 2af21e6..a42d6e8 100755 --- a/distros/debian +++ b/distros/debian @@ -29,7 +29,7 @@ init_debian() { try_run "Initializing Debian guest filesystem" \ "(cp initU.d/initU-debian $MOUNTPOINT/sbin && \ - chroot $MOUNTPOINT /sbin/initU-debian -I $IP -N $NETMASK -G $GATEWAY -D $NAMESERVER $DOMNAME)" + chroot $MOUNTPOINT /sbin/initU-debian $DOMNAME)" if test "x$DRY_RUN" = "x" ; then cat > /etc/apt/sources.list << EOF diff --git a/distros/gentoo b/distros/gentoo index 92795f1..f452fe7 100755 --- a/distros/gentoo +++ b/distros/gentoo @@ -56,7 +56,7 @@ init_gentoo() { try_run "Initializing Gentoo guest" \ "(cp initU.d/initU-gentoo $MOUNTPOINT/sbin && \ - chroot $MOUNTPOINT /sbin/initU-gentoo -I $IP -N $NETMASK -G $GATEWAY -D $NAMESERVER $DOMNAME)" + chroot $MOUNTPOINT /sbin/initU-gentoo $DOMNAME)" try_run "Unmounting $MOUNTPOINT" \ umount $MOUNTPOINT diff --git a/distros/ubuntu b/distros/ubuntu index a84e77e..ba35539 100755 --- a/distros/ubuntu +++ b/distros/ubuntu @@ -34,7 +34,7 @@ EOF try_run "Initializing Ubuntu guest filesystem" \ "(cp initU.d/initU-debian $MOUNTPOINT/sbin && \ - chroot $MOUNTPOINT /sbin/initU-debian -I $IP -N $NETMASK -G $GATEWAY -D $NAMESERVER $DOMNAME)" + chroot $MOUNTPOINT /sbin/initU-debian $DOMNAME)" try_run "Unmounting $MOUNTPOINT" \ umount $MOUNTPOINT diff --git a/initU.d/initU-debian b/initU.d/initU-debian index 5df5865..c7588f5 100755 --- a/initU.d/initU-debian +++ b/initU.d/initU-debian @@ -3,18 +3,6 @@ # Script name THIS="initU-debian" -# Default IP address -IP="10.1.0.100" - -# Default netmask -NETMASK="255.255.0.0" - -# Default gateway -GATEWAY="10.0.0.1" - -# Default nameserver -NAMESERVER="10.0.0.1" - ############################################################ ## No configurable variables past this point ## ############################################################ @@ -40,12 +28,6 @@ usage () { echo >&2 "General options" echo >&2 " -n, --dry-run Don't actually run any commands; just print them." echo >&2 - echo >&2 "Networking options" - echo >&2 " -I, --ip address Set the IP address" - echo >&2 " -N, --netmask address Set the netmask" - echo >&2 " -G, --gateway address Set the gateway" - echo >&2 " -D, --nameserver address Set the DNS nameserver address" - echo >&2 echo >&2 "Miscellaneous options" echo >&2 " -h, --help Display this help and exit" echo >&2 " -v, --verbose Print informative messages"