=== modified file 'zsh-functions/confz_vserver_init' --- zsh-functions/confz_vserver_init 2014-06-19 19:16:30 +0000 +++ zsh-functions/confz_vserver_init 2014-06-19 19:03:09 +0000 @@ -29,15 +29,17 @@ setvar vdir /vservers/${vars[name]} local ctx ret - local -a fails if [[ -e ${vars[etcdir]}/context ]]; then - if [[ $(<${vars[etcdir]}/context) != ${vars[context_id]} ]]; then + if [[ $(<${vars[etcdir]}/context) == ${vars[context_id]} ]]; then + ret=0 + else die "$0: vserver ${(qqq)vars[name]} " \ "has context different from ${(qqq)vars[context_id]}" fi else - fails+=( "$(<${vars[etcdir]}/context) missing" ) + ret=1 + fail_reason="$(<${vars[etcdir]}/context) missing" for ctx in /etc/vservers/*/context; do if [[ $(<$ctx) == ${vars[context_id]} ]]; then die "$0: context id already used by $ctx" @@ -45,7 +47,8 @@ done fi if ! [[ -h ${vars[etcdir]}/vdir ]]; then - fails=( "${vars[etcdir]}/vdir missing" ) + fail_reason="${vars[etcdir]}/vdir missing" + ret=1 fi require mounted_volume :size :filesystem \ @@ -55,8 +58,7 @@ require deployed_system :source path=${vars[vdir]} - fail_reason="${(j:,:)fails}" - return $#fails + return $ret } confz_vserver_do() {