diff options
author | Dieter Plaetinck <dieter@plaetinck.be> | 2008-12-03 23:17:41 +0100 |
---|---|---|
committer | Dieter Plaetinck <dieter@plaetinck.be> | 2008-12-03 23:17:41 +0100 |
commit | c1c7a7da454dd7d0f45b1cb767bc1f07459ff54d (patch) | |
tree | 29a96b38097ae522efcca9966dda1f72916ae370 | |
parent | d1857226fba6fdb27e55154ebb51ff6735816d20 (diff) |
few fixes
-rw-r--r-- | src/core/libs/lib-ui-interactive.sh | 8 | ||||
-rw-r--r-- | src/core/libs/lib-ui.sh | 1 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/core/libs/lib-ui-interactive.sh b/src/core/libs/lib-ui-interactive.sh index 0fcef00..c399b08 100644 --- a/src/core/libs/lib-ui-interactive.sh +++ b/src/core/libs/lib-ui-interactive.sh @@ -398,7 +398,7 @@ interactive_filesystems() { do # generate a menu based on the information in the datafile menu_list= - while read $part $type $label $fs + while read part type label fs do menu_list="$menu_list $part (type:$type,label:$label,fs:$fs)" #don't add extra spaces, dialog doesn't like that. done < $BLOCK_DATA @@ -408,9 +408,9 @@ interactive_filesystems() { [ "$ANSWER_OPTION" == DONE ] && USERHAPPY=1 && break part=$ANSWER_OPTION - part_type=` awk "/^$part/ {print \$2}" $BLOCK_DATA` - part_label=`awk "/^$part/ {print \$3}" $BLOCK_DATA` - fs=` awk "/^$part/ {print \$4}" $BLOCK_DATA` + part_type=` awk "/^${part//\//\\\/}/ {print \$2}" $BLOCK_DATA` # the bash substition replaces all /'s with \/'s otherwise awk complains + part_label=`awk "/^${part//\//\\\/}/ {print \$3}" $BLOCK_DATA` + fs=` awk "/^${part//\//\\\/}/ {print \$4}" $BLOCK_DATA` [ "$part_label" == no_label ] && part_label= [ "$fs" == no_fs ] && fs= diff --git a/src/core/libs/lib-ui.sh b/src/core/libs/lib-ui.sh index 61fface..d4520bc 100644 --- a/src/core/libs/lib-ui.sh +++ b/src/core/libs/lib-ui.sh @@ -224,6 +224,7 @@ _dia_ask_option () _cli_ask_option () { #TODO: strip out color codes + #TODO: if user entered incorrect choice, ask him again DEFAULT="" [ "$1" != 'no' ] && DEFAULT=$1 [ -z "$2" ] && die_error "ask_option \$2 must be the title" |