sipb-xen-install deals with lvcreate, and some tweaks
[invirt/packages/invirt-autoinstaller.git] / guest / etc / init.d / rcS.sipb-xen
index d786d7d..103c195 100644 (file)
@@ -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 FSSIZE=${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