source: trunk/packages/sipb-xen-autoinstaller/guest/etc/init.d/rcS.sipb-xen @ 929

Last change on this file since 929 was 929, checked in by price, 15 years ago

factor out common autoinstaller code for both guest and host

File size: 650 bytes
Line 
1#!/bin/bash
2for x in $(cat /proc/cmdline); do
3    case $x in
4        ip=*)
5        /usr/lib/klibc/bin/ipconfig -d ${x#ip=}
6        ;;
7        mirror=*)
8        export MIRROR=${x#mirror=}
9        ;;
10        dist=*)
11        export DIST=${x#dist=}
12        ;;
13        arch=*)
14        export ARCH=${x#arch=}
15        ;;
16        imagesize=*)
17        export IMAGESIZE=${x#imagesize=}
18        ;;
19        noinstall)
20        exit 0
21        ;;
22    esac
23done
24
25mount -t tmpfs none /var/log
26mount -t tmpfs none /tmp
27
28export TARGET=/dev/hda
29export ARCH=${ARCH-amd64}
30export IP=$(ifconfig eth0 | sed -n 's/.*inet addr:\([0-9\.]*\).*/\1/p')
31export HOSTNAME=$(hostname)
32
33# args passed through environment rather than as 7 positional args
34/usr/sbin/sipb-xen-create-image
35
36busybox poweroff
37exit 0
Note: See TracBrowser for help on using the repository browser.