summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorDieter Plaetinck <dieter@plaetinck.be>2008-11-10 18:27:57 +0100
committerDieter Plaetinck <dieter@plaetinck.be>2008-11-10 18:27:57 +0100
commitfc3809dec26d21eb18a568b9ec018ed0f042f901 (patch)
tree772dafa989cf431ba48723cf54887913a8295af7 /src/core
parentce72829ec480acdbcd0d853377b895854feea80d (diff)
several small stupid thingies
Diffstat (limited to 'src/core')
-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
-rw-r--r--src/core/procedures/interactive8
4 files changed, 14 insertions, 16 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 ]
diff --git a/src/core/procedures/interactive b/src/core/procedures/interactive
index 65a4b28..8142b4e 100644
--- a/src/core/procedures/interactive
+++ b/src/core/procedures/interactive
@@ -95,7 +95,7 @@ mainmenu()
"3")
execute worker package_list && S_SELECT=1 ;;
"4")
- execute worker install_packages && S_INSTALL=1 && { execute worker auto_fstab; execute worker auto_network; execute worker auto_locale; } ;;
+ execute worker install_packages && S_INSTALL=1 && { execute worker auto_fstab; execute worker auto_network; execute worker auto_locale; } ;; #TODO: next item is again install packages
"5")
execute worker configure_system && S_CONFIG=1 && { execute worker mkinitcpio; execute worker locales; } ;;
"6")
@@ -104,11 +104,9 @@ mainmenu()
"None" "\Zb\Z1Warning\Z0\ZB: you must install your own bootloader!"
execute worker install_bootloader "$ANSWER_OPTION";;
"7")
- notify "If the install finished successfully, you can now type 'reboot' to restart the system."
- stop_installer ;;
+ notify "If the install finished successfully, you can now type 'reboot' to restart the system." && stop_installer ;;
*)
- ask_yesno "Abort Installation?" && stop_installer
- ;;
+ ask_yesno "Abort Installation?" && stop_installer ;;
esac
}