|
Last change
on this file since 929 was
929,
checked in by price, 17 years ago
|
|
factor out common autoinstaller code for both guest and host
|
|
File size:
650 bytes
|
| Line | |
|---|
| 1 | #!/bin/bash |
|---|
| 2 | for 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 |
|---|
| 23 | done |
|---|
| 24 | |
|---|
| 25 | mount -t tmpfs none /var/log |
|---|
| 26 | mount -t tmpfs none /tmp |
|---|
| 27 | |
|---|
| 28 | export TARGET=/dev/hda |
|---|
| 29 | export ARCH=${ARCH-amd64} |
|---|
| 30 | export IP=$(ifconfig eth0 | sed -n 's/.*inet addr:\([0-9\.]*\).*/\1/p') |
|---|
| 31 | export HOSTNAME=$(hostname) |
|---|
| 32 | |
|---|
| 33 | # args passed through environment rather than as 7 positional args |
|---|
| 34 | /usr/sbin/sipb-xen-create-image |
|---|
| 35 | |
|---|
| 36 | busybox poweroff |
|---|
| 37 | exit 0 |
|---|
Note: See
TracBrowser
for help on using the repository browser.