summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
629cd65)
assumed to have global values that are valid for all NICs. This update
is largely to keep up appearances, as this package is no longer used.
But, since it is still installed, and we need to get rid of the
network section in master.yaml (which this package is the only consumer
of), here we are.
# TARGET a device filename
# FSSIZE the desired filesystem size in mebibytes (rest will be swap)
# ARCH, DIST, MIRROR
# TARGET a device filename
# FSSIZE the desired filesystem size in mebibytes (rest will be swap)
# ARCH, DIST, MIRROR
-# HOSTNAME, IP
-#
-# Optional: GATEWAY, NETMASK. These default to values in invirt-getconf, if installed
+# HOSTNAME, IP, GATEWAY, NETMASK
-if [ -z "$GATEWAY" ]; then
- GATEWAY=$(invirt-getconf network.gateway)
-fi
-
-if [ -z "$NETMASK" ]; then
- NETMASK=$(invirt-getconf network.netmask)
-fi
-
echo ,"${FSSIZE}"$',L,*\n,,S\n;\n;' | sfdisk -uM -H 255 -S 63 "$TARGET"
dmsetup info "$TARGET" 2>/dev/null && kpartx -a "$TARGET"
echo ,"${FSSIZE}"$',L,*\n,,S\n;\n;' | sfdisk -uM -H 255 -S 63 "$TARGET"
dmsetup info "$TARGET" 2>/dev/null && kpartx -a "$TARGET"
+invirt-autoinstaller (0.0.37) precise; urgency=low
+
+ * Make specification of GATEWAY and NETMASK mandatory; they cannot
+ be assumed to be the same globally.
+
+ -- Mitchell Berger <mitchb@mit.edu> Wed, 16 May 2018 22:20:00 -0400
+
invirt-autoinstaller (0.0.36) precise; urgency=low
* Updating version for precise.
invirt-autoinstaller (0.0.36) precise; urgency=low
* Updating version for precise.
export TARGET=/dev/hda
export ARCH=${ARCH-amd64}
export IP=$(ifconfig eth0 | sed -n 's/.*inet addr:\([0-9\.]*\).*/\1/p')
export TARGET=/dev/hda
export ARCH=${ARCH-amd64}
export IP=$(ifconfig eth0 | sed -n 's/.*inet addr:\([0-9\.]*\).*/\1/p')
+export NETMASK=$(ifconfig eth0 | sed -n 's/.*inet addr:.*Mask:\([0-9\.]*\).*/\1/p')
+export GATEWAY=$(ip route list | sed -n 's/default via \([0-9\.]*\).*/\1/p')
export HOSTNAME=$(hostname)
/etc/init.d/udev start
export HOSTNAME=$(hostname)
/etc/init.d/udev start
export FSSIZE="$5" # in mebibytes
SWAPSIZE="$6" # in mebibytes
export IP="$7"
export FSSIZE="$5" # in mebibytes
SWAPSIZE="$6" # in mebibytes
export IP="$7"
+export NETMASK="$8"
+export GATEWAY="$9"
export ARCH=amd64
VGNAME=xenvg
#LVSIZE=`lvs --noheadings --units m --nosuffix -o Size /dev/xenvg/d_foobar_hda | sed 's/\..*//'`
export ARCH=amd64
VGNAME=xenvg
#LVSIZE=`lvs --noheadings --units m --nosuffix -o Size /dev/xenvg/d_foobar_hda | sed 's/\..*//'`
-if [ -z "$IP" ]; then
- IP=`host $HOSTNAME.xvm.mit.edu | sed 's/.* //' | head -n 1`
-fi
-
/sbin/lvcreate -L $(($FSSIZE+$SWAPSIZE))m -n "${NAME}_hda" $VGNAME
export TARGET=/dev/mapper/xenvg-"$(echo "${NAME}_hda" | sed -e 's/-/--/g')"
/sbin/lvcreate -L $(($FSSIZE+$SWAPSIZE))m -n "${NAME}_hda" $VGNAME
export TARGET=/dev/mapper/xenvg-"$(echo "${NAME}_hda" | sed -e 's/-/--/g')"