summaryrefslogtreecommitdiff
path: root/src/core/libs
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/libs')
-rw-r--r--src/core/libs/lib-software.sh2
-rw-r--r--src/core/libs/lib-ui-interactive.sh10
-rw-r--r--src/core/libs/lib-ui.sh10
3 files changed, 11 insertions, 11 deletions
diff --git a/src/core/libs/lib-software.sh b/src/core/libs/lib-software.sh
index 77f99ec..83ea100 100644
--- a/src/core/libs/lib-software.sh
+++ b/src/core/libs/lib-software.sh
@@ -61,6 +61,6 @@ target_configure_inital_locale()
target_locale-gen ()
{
- notify "Generating glibc base locales..."
+ infofy "Generating glibc base locales..."
chroot ${var_TARGET_DIR} locale-gen >/dev/null
} \ No newline at end of file
diff --git a/src/core/libs/lib-ui-interactive.sh b/src/core/libs/lib-ui-interactive.sh
index 1fa9261..0d42e42 100644
--- a/src/core/libs/lib-ui-interactive.sh
+++ b/src/core/libs/lib-ui-interactive.sh
@@ -506,12 +506,10 @@ interactive_runtime_network() {
interactive_install_grub() {
- get_grub_map
- local grubmenu="$var_TARGET_DIR/boot/grub/menu.lst"
- if [ ! -f $grubmenu ]; then
- notify "Error: Couldn't find $grubmenu. Is GRUB installed?"
- return 1
- fi
+ get_grub_map
+ local grubmenu="$var_TARGET_DIR/boot/grub/menu.lst"
+ [ ! -f $grubmenu ] && show_warning "No grub?" "Error: Couldn't find $grubmenu. Is GRUB installed?" && return 1
+
# try to auto-configure GRUB...
if [ "$PART_ROOT" != "" -a "$S_GRUB" != "1" ]; then
grubdev=$(mapdev $PART_ROOT)
diff --git a/src/core/libs/lib-ui.sh b/src/core/libs/lib-ui.sh
index b718b03..927ba96 100644
--- a/src/core/libs/lib-ui.sh
+++ b/src/core/libs/lib-ui.sh
@@ -26,14 +26,15 @@ show_warning ()
[ -z "$1" ] && die_error "show_warning needs a title"
[ -z "$2" ] && die_error "show_warning needs an item to show"
[ -n "$3" -a "$3" != msg -a "$3" != text ] && die_error "show_warning \$3 must be text or msg"
- [ -z "$3" ] && 3=msg
+ type=msg
+ [ -n "$3" ] && type=$3
if [ "$var_UI_TYPE" = dia ]
then
- _dia_DIALOG --title "$1" --exit-label "Continue" --$3box "$2" 18 70 || die_error "dialog could not show --$3box $2. often this means a file does not exist"
+ _dia_DIALOG --title "$1" --exit-label "Continue" --${type}box "$2" 18 70 || die_error "dialog could not show --${type}box $2. often this means a file does not exist"
else
echo "WARNING: $1"
- [ "$3" = msg ] && echo -e "$2"
- [ "$3" = text ] && cat $2 || die_error "Could not cat $2"
+ [ "${type}" = msg ] && echo -e "$2"
+ [ "${type}" = text ] && cat $2 || die_error "Could not cat $2"
fi
}
@@ -50,6 +51,7 @@ notify ()
}
+# like notify, but user does not need to confirm explicitly when in dia mode
infofy ()
{
if [ "$var_UI_TYPE" = dia ]