Ignore:
Timestamp:
Sep 28, 2008, 4:40:06 PM (16 years ago)
Author:
price
Message:

factor out common autoinstaller code for both guest and host

Location:
trunk/packages/sipb-xen-autoinstaller/guest
Files:
1 deleted
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/sipb-xen-autoinstaller/guest/etc/init.d/rcS.sipb-xen

    r760 r929  
    66        ;;
    77        mirror=*)
    8         MIRROR=${x#mirror=}
     8        export MIRROR=${x#mirror=}
    99        ;;
    1010        dist=*)
    11         DIST=${x#dist=}
     11        export DIST=${x#dist=}
    1212        ;;
    1313        arch=*)
    14         ARCH=${x#arch=}
     14        export ARCH=${x#arch=}
    1515        ;;
    1616        imagesize=*)
    17         IMAGESIZE=${x#imagesize=}
     17        export IMAGESIZE=${x#imagesize=}
    1818        ;;
    1919        noinstall)
     
    2222    esac
    2323done
     24
    2425mount -t tmpfs none /var/log
    2526mount -t tmpfs none /tmp
    2627
     28export TARGET=/dev/hda
     29export ARCH=${ARCH-amd64}
     30export IP=$(ifconfig eth0 | sed -n 's/.*inet addr:\([0-9\.]*\).*/\1/p')
     31export HOSTNAME=$(hostname)
    2732
    28 TARGET=/dev/hda
    29 ARCH=${ARCH-amd64}
    30 IP=$(ifconfig eth0 | sed -n 's/.*inet addr:\([0-9\.]*\).*/\1/p')
    31 HOSTNAME=$(hostname)
    32 
    33 echo ,${IMAGESIZE}$',L,*\n,,S\n;\n;' | sfdisk -uM -H 255 -S 63 $TARGET
    34 
    35 xen-create-image --image-dev ${TARGET}1 --swap-dev ${TARGET}2 --fs ext3 --ide --arch $ARCH --dist $DIST --hostname $HOSTNAME --mirror $MIRROR --ip=$IP --netmask=255.255.0.0 --gateway=18.181.0.1 --cache=yes
     33# args passed through environment rather than as 7 positional args
     34/usr/sbin/sipb-xen-create-image
    3635
    3736busybox poweroff
Note: See TracChangeset for help on using the changeset viewer.