diff options
author | Dieter Plaetinck <dieter@plaetinck.be> | 2010-12-31 16:46:41 +0100 |
---|---|---|
committer | Dieter Plaetinck <dieter@plaetinck.be> | 2010-12-31 16:46:41 +0100 |
commit | dbbf5ccabc342f6cedd975378209b0c4af20e5c6 (patch) | |
tree | e0845797b2c5369b40ebcb62217444a6249bdb41 /src/core/libs/lib-ui.sh | |
parent | bffae93369818a82f0cbbcbff81939c104699550 (diff) |
Inform user more in detail which pre/post-configure step went wrong
* Move all pre/post-configure logic to separate functions (initcpio
config, time setting, mirrorlist)
* other steps will continue to be run, even if previous one(s) failed
* at the end of the pre/post-configure step you will be warned which
steps failed, if needed.
Diffstat (limited to 'src/core/libs/lib-ui.sh')
-rw-r--r-- | src/core/libs/lib-ui.sh | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/core/libs/lib-ui.sh b/src/core/libs/lib-ui.sh index 516932e..c86ed8d 100644 --- a/src/core/libs/lib-ui.sh +++ b/src/core/libs/lib-ui.sh @@ -91,3 +91,22 @@ set_keymap () echo "$var_CONSOLEFONT" > $RUNTIME_DIR/aif-consolefont fi } + +# $1 "topic" +# shift 1; "$@" list of failed things +warn_failed () { + local topic=$1 + shift + if [ -n "$1" ] + then + local list_failed= + while [ -n "$1" ] + do + [ -n "$list_failed" ] && list_failed="$list_failed, " + list_failed="${list_failed}$1" + shift + done + show_warning "Preconfigure failed" "Beware: the following steps failed: $list_failed. Please report this. Continue at your own risk" + fi + return 0 +} |