diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2009-03-25 09:34:40 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2009-03-25 09:34:40 +0000 |
commit | eb9a1a84abbb5c37448160fa52d56cc936c389b2 (patch) | |
tree | aa0ca93d7baee813ac03f0b08bf9ec7698b3f87e /initramfs-init | |
parent | 60258b46d57c8ad4c8e68c0f324a7f25049f4620 (diff) | |
download | abuild-eb9a1a84abbb5c37448160fa52d56cc936c389b2.tar.gz abuild-eb9a1a84abbb5c37448160fa52d56cc936c389b2.tar.bz2 abuild-eb9a1a84abbb5c37448160fa52d56cc936c389b2.tar.xz abuild-eb9a1a84abbb5c37448160fa52d56cc936c389b2.zip |
initram: support for root=/dev/md0, create busybox links
Diffstat (limited to 'initramfs-init')
-rwxr-xr-x | initramfs-init | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/initramfs-init b/initramfs-init index d35f5ae..da7a464 100755 --- a/initramfs-init +++ b/initramfs-init @@ -1,10 +1,12 @@ -#!/bin/sh +#!/bin/busybox sh # this is the init script version VERSION=1.0 NEWROOT=/newroot SINGLEMODE=no +/bin/busybox --install -s + # basic environment export PATH=/usr/bin:/bin:/usr/sbin:/sbin @@ -125,6 +127,16 @@ eend 0 # check if root=... was set if [ -n "$KOPT_root" ]; then + if [ "$SINGLEMODE" = "yes" ]; then + echo "Entering single mode. Type 'exit' to continue booting." + sh + fi + case "$KOPT_root" in + /dev/md*) + mknod $KOPT_root b 9 ${KOPT_root#/dev/md} + raidautorun "$KOPT_root" + ;; + esac ebegin "Mounting root" retry_mount $KOPT_root $NEWROOT 2>/dev/null eend $? |