X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-autoinstaller.git/blobdiff_plain/539d9bb44c0df3bd0f1836b45866326d74a48df3..04a85e82bb3cd2929c4ebb0e8df2a97c73eb4890:/guest/etc/init.d/rcS.sipb-xen?ds=inline diff --git a/guest/etc/init.d/rcS.sipb-xen b/guest/etc/init.d/rcS.sipb-xen index d786d7d..ff605d6 100644 --- a/guest/etc/init.d/rcS.sipb-xen +++ b/guest/etc/init.d/rcS.sipb-xen @@ -1,16 +1,37 @@ -#!/bin/sh +#!/bin/bash for x in $(cat /proc/cmdline); do case $x in - ip=*) - /usr/lib/klibc/bin/ipconfig -d ${x#ip=} - ;; - noinstall) - exit 0 - ;; + ip=*) + /usr/lib/klibc/bin/ipconfig -d ${x#ip=} + ;; + mirror=*) + export MIRROR=${x#mirror=} + ;; + dist=*) + export DIST=${x#dist=} + ;; + arch=*) + export ARCH=${x#arch=} + ;; + imagesize=*) + export IMAGESIZE=${x#imagesize=} + ;; + noinstall) + exit 0 + ;; esac done + mount -t tmpfs none /var/log mount -t tmpfs none /tmp -sipb-xen-install + +export TARGET=/dev/hda +export ARCH=${ARCH-amd64} +export IP=$(ifconfig eth0 | sed -n 's/.*inet addr:\([0-9\.]*\).*/\1/p') +export HOSTNAME=$(hostname) + +# args passed through environment rather than as 7 positional args +/usr/sbin/sipb-xen-create-image + busybox poweroff exit 0