aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2012-03-05 10:58:29 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2012-03-05 10:58:29 +0000
commite271e0200716b4c8b0f880f918eeafc88f018a1c (patch)
treede5d92121f2718e9fadbddbe56caeaf1ef79a0f9
parent2d8bccc9b30f687813d3366294a80fa6792ac4db (diff)
downloadalpine-conf-e271e0200716b4c8b0f880f918eeafc88f018a1c.tar.bz2
alpine-conf-e271e0200716b4c8b0f880f918eeafc88f018a1c.tar.xz
setup-disk: cleanup. clarify what raidopt and raidmod does
-rw-r--r--setup-disk.in12
1 files changed, 9 insertions, 3 deletions
diff --git a/setup-disk.in b/setup-disk.in
index 6500ba7..17f9a56 100644
--- a/setup-disk.in
+++ b/setup-disk.in
@@ -164,7 +164,7 @@ find_pvs_in_vg() {
install_mounted_root() {
local mnt="$1" mnt_boot= boot_fs= root_fs=
local initfs_features="ata base ide scsi usb virtio"
- local pvs= dev= rootdev= bootdev= raidopt= root= modules=
+ local pvs= dev= rootdev= bootdev= extlinux_raidopt= root= modules=
local kernel_opts="quiet"
rootdev=$(find_mount_dev "$mnt")
@@ -192,10 +192,14 @@ install_mounted_root() {
boot_fs=$(find_mount_fs "$mnt_boot")
supported_boot_fs "$boot_fs" || return 1
+ # Check if we boot from raid so we can pass proper option to
+ # extlinux later.
if [ -e "/sys/block/${bootdev#/dev/}/md" ]; then
- raidopt="--raid"
+ extlinux_raidopt="--raid"
fi
+ # check if our root is on raid so we can feed mkinitfs and
+ # update-exlinux.conf with the proper kernel module params
for dev in $rootdev $pvs; do
[ -e "/sys/block/${dev#/dev/}/md" ] || continue
@@ -284,7 +288,9 @@ EOF
apk add --root "$mnt" $apkflags --overlay-from-stdin \
$repoflags $pkgs <$ovlfiles>/dev/null || return 1
echo ""
- is_xen || extlinux $raidopt --install "$mnt"/boot
+ if ! is_xen; then
+ extlinux $extlinux_raidopt --install "$mnt"/boot
+ fi
}
unmount_partitions() {