=== modified file 'zsh-functions/confz_vserver_init' --- zsh-functions/confz_vserver_init 2014-06-25 08:57:27 +0000 +++ zsh-functions/confz_vserver_init 2014-06-24 21:39:56 +0000 @@ -92,56 +92,17 @@ (( $? == 1 )) } -confz_vserver_listconfigs_hook_check() { - checkvars name - (($+commands[vserver-listconfigs])) || \ - die "can't find vserver-listconfigs in \$PATH" - do_command=( - ln -s $commands[vserver-listconfigs] - /etc/vservers/$vars[name]/scripts/post-start.d/vserver-listconfigs - ) - - [[ -x /etc/vservers/$vars[name]/scripts/post-start.d/vserver-listconfigs ]] -} - -confz_vserver_listconfigs_hook_do() { - local lnk - lnk=/etc/vservers/$vars[name]/scripts/post-start.d/vserver-listconfigs - mkdir -p $lnk:h || return $? - ln -s $commands[vserver-listconfigs] $lnk || return $? -} - - confz_vserver_autorestart() { checkvars name - require vserver_listconfigs_hook :name require vserver_started :name %context_id - do_command=( vserver -- $vars[name] condrestart ) - - local -a files mtab vdir - - vdir=/etc/vservers/$vserver_name/vdir - vdir=$vdir:A - - # TODO: diff here and prettyprint reason - mtab="$(grep '^[^ ]* '$vdir'[/ ]' /etc/mtab)" - [[ $mtab == "$(