Ignore:
Timestamp:
Jan 1, 2010, 11:48:19 PM (15 years ago)
Author:
gdb
Message:

Don't hardcode netmask and gateway

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/invirt-autoinstaller/common/usr/sbin/invirt-create-image

    r2161 r2844  
    66#  ARCH, DIST, MIRROR
    77#  HOSTNAME, IP
     8#
     9# Optional: GATEWAY, NETMASK.  These default to values in invirt-getconf, if installed
    810
    911set -e
     12
     13if [ "$GATEWAY" = "" ]; then
     14    GATEWAY=$(invirt-getconf autoinstaller.gateway)
     15fi
     16
     17if [ "$NETMASK" = "" ]; then
     18    NETMASK=$(invirt-getconf autoinstaller.netmask)
     19fi
    1020
    1121echo ,"${FSSIZE}"$',L,*\n,,S\n;\n;' | sfdisk -uM -H 255 -S 63 "$TARGET"
     
    1424
    1525xen-create-image --image-dev "${TARGET}1" --swap-dev "${TARGET}2" --fs ext3 --ide \
    16  --hostname "$HOSTNAME" --ip="$IP" --netmask=255.255.0.0 --gateway=18.181.0.1 \
     26 --hostname "$HOSTNAME" --ip="$IP" --netmask="$NETMASK" --gateway="$GATEWAY" \
    1727 --arch "$ARCH" --dist "$DIST" --mirror "$MIRROR" --cache=yes --verbose
    1828
Note: See TracChangeset for help on using the changeset viewer.