confz

git mirror of https://ccx.te2000.cz/bzr/confz
git clone https://ccx.te2000.cz/git/confz
Log | Files | Refs

commit 255766dfbd225c8ac4022ed8ee306996030b1cee
parent dbe2bf169ec53cffbb54f4c153e78359f51de8ed
Author: Jan Pobrislo <ccx@webprojekty.cz>
Date:   Thu, 26 Jun 2014 20:15:23 +0200

create directory for the symlink
Diffstat:
Mzsh-functions/confz_vserver_init | 11+++++++----
1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/zsh-functions/confz_vserver_init b/zsh-functions/confz_vserver_init @@ -94,16 +94,19 @@ confz_vserver_stopped_check() { 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_check() { + mkdir -p /etc/vservers/$vars[name]/scripts/post-start.d || return $? + ln -s $commands[vserver-listconfigs] \ + /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