/usr/lib/klibc/bin/ipconfig -d ${x#ip=}
;;
mirror=*)
- MIRROR=${x#mirror=}
+ export MIRROR=${x#mirror=}
;;
dist=*)
- DIST=${x#dist=}
+ export DIST=${x#dist=}
;;
arch=*)
- ARCH=${x#arch=}
+ export ARCH=${x#arch=}
;;
imagesize=*)
- IMAGESIZE=${x#imagesize=}
+ export IMAGESIZE=${x#imagesize=}
;;
noinstall)
exit 0
;;
esac
done
+
mount -t tmpfs none /var/log
mount -t tmpfs none /tmp
+export TARGET=/dev/hda
+export ARCH=${ARCH-amd64}
+export IP=$(ifconfig eth0 | sed -n 's/.*inet addr:\([0-9\.]*\).*/\1/p')
+export HOSTNAME=$(hostname)
-TARGET=/dev/hda
-ARCH=${ARCH-amd64}
-IP=$(ifconfig eth0 | sed -n 's/.*inet addr:\([0-9\.]*\).*/\1/p')
-HOSTNAME=$(hostname)
-
-echo ,${IMAGESIZE}$',L,*\n,,S\n;\n;' | sfdisk -uM -H 255 -S 63 $TARGET
-
-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
+# args passed through environment rather than as 7 positional args
+/usr/sbin/sipb-xen-create-image
busybox poweroff
exit 0