Rev | Line | |
---|
[929] | 1 | #!/bin/bash |
---|
| 2 | # Usage: no command-line args. |
---|
| 3 | # "arguments" come in environment: |
---|
| 4 | # TARGET a device filename, IMAGESIZE its size in XXXX what unit? |
---|
| 5 | # ARCH, DIST, MIRROR |
---|
| 6 | # HOSTNAME, IP |
---|
| 7 | |
---|
| 8 | echo ,"${IMAGESIZE}"$',L,*\n,,S\n;\n;' | sfdisk -uM -H 255 -S 63 "$TARGET" |
---|
| 9 | |
---|
[931] | 10 | kpartx -a "$TARGET" # should be no-op in guest |
---|
| 11 | |
---|
[929] | 12 | xen-create-image --image-dev "${TARGET}1" --swap-dev "${TARGET}2" --fs ext3 --ide \ |
---|
| 13 | --hostname "$HOSTNAME" --ip="$IP" --netmask=255.255.0.0 --gateway=18.181.0.1 \ |
---|
| 14 | --arch "$ARCH" --dist "$DIST" --mirror "$MIRROR" --cache=yes |
---|
| 15 | |
---|
[931] | 16 | kpartx -d $VOLUME |
---|
| 17 | |
---|
[929] | 18 | exit 0 |
---|
Note: See
TracBrowser
for help on using the repository browser.