Changeset 938 for trunk/packages/sipb-xen-autoinstaller
- Timestamp:
- Sep 28, 2008, 8:16:05 PM (16 years ago)
- Location:
- trunk/packages/sipb-xen-autoinstaller
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/packages/sipb-xen-autoinstaller/common/usr/sbin/sipb-xen-create-image
r937 r938 3 3 # "arguments" come in environment: 4 4 # TARGET a device filename 5 # IMAGESIZE the desired filesystem size in megabytes (rest will be swap)5 # FSSIZE the desired filesystem size in megabytes (rest will be swap) 6 6 # ARCH, DIST, MIRROR 7 7 # HOSTNAME, IP … … 9 9 set -e 10 10 11 echo ,"${ IMAGESIZE}"$',L,*\n,,S\n;\n;' | sfdisk -uM -H 255 -S 63 "$TARGET"11 echo ,"${FSSIZE}"$',L,*\n,,S\n;\n;' | sfdisk -uM -H 255 -S 63 "$TARGET" 12 12 13 13 kpartx -a "$TARGET" # should be no-op in guest … … 17 17 --arch "$ARCH" --dist "$DIST" --mirror "$MIRROR" --cache=yes 18 18 19 kpartx -d $VOLUME19 kpartx -d "$TARGET" 20 20 21 21 exit 0 -
trunk/packages/sipb-xen-autoinstaller/guest/etc/init.d/rcS.sipb-xen
r929 r938 15 15 ;; 16 16 imagesize=*) 17 export IMAGESIZE=${x#imagesize=}17 export FSSIZE=${x#imagesize=} 18 18 ;; 19 19 noinstall) -
trunk/packages/sipb-xen-autoinstaller/host/usr/sbin/sipb-xen-install
r937 r938 5 5 # Unmount it, then kpartx -d $TARGET to clean up. 6 6 7 set -e 8 7 9 export PATH #WTF? 8 10 9 LVNAME="$1"11 NAME="$1" 10 12 export HOSTNAME="$2" 11 13 export DIST="$3" 12 14 export MIRROR="$4" 13 export IMAGESIZE="$5" # in megabytes 14 export IP="$6" 15 export FSSIZE="$5" # in megabytes 16 SWAPSIZE="$6" # in megabytes 17 export IP="$7" 15 18 16 19 export ARCH=amd64 20 VGNAME=xenvg 17 21 18 22 #LVSIZE=`lvs --noheadings --units M --nosuffix -o Size /dev/xenvg/d_foobar_hda | sed 's/\..*//'` … … 22 26 fi 23 27 24 export TARGET=/dev/mapper/xenvg-$(echo "$LVNAME" | sed -e 's/-/--/g')_hda 28 /sbin/lvcreate -L $(($FSSIZE+$SWAPSIZE))M -n "${NAME}_hda" $VGNAME 29 30 export TARGET=/dev/mapper/xenvg-"$(echo "${NAME}_hda" | sed -e 's/-/--/g')" 25 31 26 32 /usr/sbin/sipb-xen-create-image 27
Note: See TracChangeset
for help on using the changeset viewer.