diff options
-rw-r--r-- | TODO | 2 | ||||
-rw-r--r-- | src/core/libs/lib-ui-interactive.sh | 77 |
2 files changed, 38 insertions, 41 deletions
@@ -3,7 +3,6 @@ See also the FIXME's and TODO's in the code. CURRENT ISSUES: * date/time setting stuff (see ML thread) hangs at select timezone? -* keyboard stuff (setting consolefont and keymap + setting in $target/etc/rc.conf ) * grub sedding sometimes does, and sometimes doesn't work. default config remains (eg /dev/hda3) * when invoking /arch/aif -p interactive on a "normal" pc, it always wants to abort * check everywhere that if users cancels something, we return 1, empty string behavior etc @@ -33,7 +32,6 @@ CURRENT ISSUES: * the old installer asked a lot of questions before actually configuring the system, eg like 'do you need support for booting from nfs/softraid/lvm2/encrypted, custom dst file?' etc.\ do we still need this? why (not)?, and a select tag thingie would be nicer imho * refactor all pacman stuff (modularize/functionize etc) -* in lvm VG editor you can press "cancel" (when 'new' is selected, maybe otherwise too) and create a new LV which will get a block entry, but no fs entry on the VG block! * aif : na "mijn" partitielayout: bij grub ( nog voor text editor op menu.lst) zegt iets ( op foreground van ncurses) Can't remove.. ik denk zelfs 'Grub: Can't remove..' en daarna een gewone entry, geen uuid's gewoon /dev/sda3 ro * port from /arch/setup: grub install chroot thing (http://projects.archlinux.org/?p=installer.git;a=commitdiff;h=4565577dbd2182dd49612f1e0b68288f5573bf7b) (waiting for ticket http://bugs.archlinux.org/task/13277) * ext4 default options? -O dir_index,extent,uninit_bg ? diff --git a/src/core/libs/lib-ui-interactive.sh b/src/core/libs/lib-ui-interactive.sh index a782a12..bd66038 100644 --- a/src/core/libs/lib-ui-interactive.sh +++ b/src/core/libs/lib-ui-interactive.sh @@ -484,53 +484,52 @@ interactive_filesystems() { then for lv in `sed 's/|/ /g' <<< $fs` do - label=$( cut -d ';' -f 6 <<< $lv) - size=$(cut -d ';' -f 7 <<< $lv) + label=$(cut -d ';' -f 6 <<< $lv) + size=$( cut -d ';' -f 7 <<< $lv) list="$list $label $size" done - else - list="XXX no-LV's-defined-yet-make-a-new-one" fi list="$list empty NEW" - ask_option empty "Manage LV's on this VG" "Edit/create new LV's on this VG:" required $list - EDIT_VG=$ANSWER_OPTION - if [ "$ANSWER_OPTION" = XXX -o "$ANSWER_OPTION" = empty ] - then - # a new LV must be created on this VG - if interactive_filesystem $part $part_type $part_label '' + ask_option empty "Manage LV's on this VG" "Edit/create new LV's on this VG:" required $list && { + EDIT_VG=$ANSWER_OPTION + if [ "$ANSWER_OPTION" = empty ] then - if [ "$NEW_FILESYSTEM" != no_fs ] + # a new LV must be created on this VG + if interactive_filesystem $part $part_type $part_label '' then - [ -n "$fs" ] && fs="$fs|$NEW_FILESYSTEM" - [ -z "$fs" ] && fs=$NEW_FILESYSTEM + if [ "$NEW_FILESYSTEM" != no_fs ] + then + [ -n "$fs" ] && fs="$fs|$NEW_FILESYSTEM" + [ -z "$fs" ] && fs=$NEW_FILESYSTEM + fi fi + else + # an existing LV will be edited and it's settings updated + for lv in `sed 's/|/ /g' <<< $fs` + do + label=$(cut -d ';' -f 6 <<< $lv) + [ "$label" = "$EDIT_VG" ] && found_lv="$lv" + done + interactive_filesystem $part $part_type $part_label "$found_lv" + newfs= + for lv in `sed 's/|/ /g' <<< $fs` + do + label=$(cut -d ';' -f 6 <<< $lv) + if [ "$label" != "$EDIT_VG" ] + then + add=$lv + elif [ $NEW_FILESYSTEM != no_fs ] + then + add=$NEW_FILESYSTEM + else + add= + fi + [ -n "$add" -a -n "$newfs" ] && newfs="$newfs|$add" + [ -n "$add" -a -z "$newfs" ] && newfs=$add + done + fs=$newfs fi - else - # an existing LV will be edited and it's settings updated - for lv in `sed 's/|/ /g' <<< $fs` - do - label=$(cut -d ';' -f 6 <<< $lv) - [ "$label" = "$EDIT_VG" ] && found_lv="$lv" - done - interactive_filesystem $part $part_type $part_label "$found_lv" - newfs= - for lv in `sed 's/|/ /g' <<< $fs` - do - label=$(cut -d ';' -f 6 <<< $lv) - if [ "$label" != "$EDIT_VG" ] - then - add=$lv - elif [ $NEW_FILESYSTEM != no_fs ] - then - add=$NEW_FILESYSTEM - else - add= - fi - [ -n "$add" -a -n "$newfs" ] && newfs="$newfs|$add" - [ -n "$add" -a -z "$newfs" ] && newfs=$add - done - fs=$newfs - fi + } else interactive_filesystem $part $part_type "$part_label" "$fs" [ $? -eq 0 ] && fs=$NEW_FILESYSTEM |