=== modified file 'sbin/vserver-listconfigs' --- sbin/vserver-listconfigs 2014-06-26 20:44:20 +0000 +++ sbin/vserver-listconfigs 2014-06-26 18:40:18 +0000 @@ -16,6 +16,6 @@ vdir=/etc/vservers/$vserver_name/vdir vdir=$vdir:A -print -rl - >/var/run/vservers/$vserver_name.files /etc/vservers/$vserver_name/**/* +print -rl - >/var/run/vservers/$vserver_name.files /etc/vservers/**/*(.) grep >/var/run/vservers/$vserver_name.mtab '^[^ ]* '$vdir'[/ ]' /etc/mtab true # don't fail if grep matches nothing === modified file 'zsh-functions/confz_vserver_init' --- zsh-functions/confz_vserver_init 2014-06-26 20:44:20 +0000 +++ zsh-functions/confz_vserver_init 2014-06-26 19:36:48 +0000 @@ -117,37 +117,22 @@ do_command=( vserver -- $vars[name] condrestart ) - local -a files mtab vdir failures - local fname mtab_list files_list + local -a files mtab vdir vdir=/etc/vservers/$vars[name]/vdir vdir=$vdir:A - mtab_list=/var/run/vservers/$vars[name].mtab - files_list=/var/run/vservers/$vars[name].files - - if ! [[ -f $mtab_list ]]; then - fail_reason="file $mtab_list not found" - return 1 - fi - - if ! [[ -f $files_list ]]; then - fail_reason="file $files_list not found" - return 1 - fi - + + [[ -f /var/run/vservers/$vars[name].mtab ]] || return 1 + [[ -f /var/run/vservers/$vars[name].files ]] || return 1 + + # TODO: diff here and prettyprint reason mtab="$(grep '^[^ ]* '$vdir'[/ ]' /etc/mtab)" [[ $mtab == "$(