=== modified file 'bin/confz' --- bin/confz 2014-06-26 18:23:05 +0000 +++ bin/confz 2014-06-26 18:08:30 +0000 @@ -50,7 +50,7 @@ # set $vars parameter if it's empty (ie. set default value) defvar() { - if ! (($+vars[$1])); then + if ! (($+vars[$1])) || [[ -z $vars[$1] ]]; then setvar $1 $2 fi } @@ -60,7 +60,7 @@ local var local -a empty for var in "$@"; do - if ! (($+vars[$var])); then + if ! (($+vars[$var])) || [[ -z $vars[$var] ]]; then empty+=( $var ) fi done === modified file 'zsh-functions/confz_fs_init' --- zsh-functions/confz_fs_init 2014-06-26 18:23:05 +0000 +++ zsh-functions/confz_fs_init 2014-06-25 09:05:17 +0000 @@ -7,10 +7,12 @@ # configure LVM2 logical volume confz_logical_volume_check() { - [[ -n ${vars[vg_name]:=${DEFAULT_VG}} ]] || \ + defvar vg_name ${DEFAULT_VG:-} + [[ -n ${vars[vg_name]} ]] || \ die "$0: DEFAULT_VG is unset and no 'vg_name' was passed" - [[ -n ${vars[size]:=${DEFAULT_VOLUME_SIZE}} ]] || \ + defvar size ${DEFAULT_VOLUME_SIZE:-} + [[ -n ${vars[size]} ]] || \ die "$0: DEFAULT_VOLUME_SIZE is unset and no 'size' was passed" checkvars lv_name @@ -31,7 +33,8 @@ # create filesystem on block device confz_filesystem_check() { - [[ -n ${vars[filesystem]:=${DEFAULT_FS}} ]] || \ + defvar filesystem ${DEFAULT_FS:-} + [[ -n ${vars[filesystem]} ]] || \ die "$0: DEFAULT_FS is unset and no 'filesystem' was passed" checkvars label device filesystem === modified file 'zsh-functions/confz_vserver_init' --- zsh-functions/confz_vserver_init 2014-06-26 18:23:05 +0000 +++ zsh-functions/confz_vserver_init 2014-06-26 18:15:23 +0000 @@ -78,7 +78,7 @@ vserver --silent -- $vars[name] running || return $? local context_id context_id=$(