diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2011-05-02 15:12:38 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2011-05-02 15:12:38 +0000 |
commit | 18fec8f81c18116b9475caccafe12904e4c13528 (patch) | |
tree | 380931d55d00f03ebb56a7f1eb62458110ca732d | |
parent | f597a8588a03c1bc9f6f0504c86c048cbff7447b (diff) | |
download | alpine-conf-18fec8f81c18116b9475caccafe12904e4c13528.zip |
setup-disk: some bugfixes
- always install syslinux
- add lvm to runlevel boot
- fix local variable $size
- dont display the /dev/ prefix on disk info
-rw-r--r-- | setup-disk.in | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/setup-disk.in b/setup-disk.in index d6ef03d..66de5c7 100644 --- a/setup-disk.in +++ b/setup-disk.in @@ -358,17 +358,17 @@ stop_all_raid() { init_progs() { local raidpkg= [ -n "$USE_RAID" ] && raidpkg="mdadm" - apk_add -q sfdisk e2fsprogs lvm2 $raidpkg $@ + apk_add -q sfdisk e2fsprogs lvm2 $raidpkg syslinux $@ } show_disk_info() { - local disk= vendor= model= d= + local disk= vendor= model= d= size= for disk in $@; do d=${disk##*/} vendor=$(cat /sys/block/$d/device/vendor 2>/dev/null) model=$(cat /sys/block/$d/device/model 2>/dev/null) size=$(awk '{gb = ($1 * 512)/1000000000; printf "%.1f GB\n", gb}' /sys/block/$d/size 2>/dev/null) - echo " $disk ($size $vendor $model)" + echo " $d ($size $vendor $model)" done } @@ -587,6 +587,7 @@ data_only_disk_install_lvm() { setup_lvm_swap $vgname lvcreate --quiet -n ${var_dev##*/} -l 100%FREE $vgname setup_mdadm_conf + rc-update add lvm boot setup_var $var_dev } @@ -675,6 +676,7 @@ native_disk_install_lvm() { setup_lvm_volume_group $vgname $@ || return 1 setup_lvm_swap $vgname lvcreate --quiet -n ${root_dev##*/} -l 100%FREE $vgname + rc-update add lvm boot setup_root $root_dev $BOOT_DEV } |