../bin/cdist-config -> core/__cdist_init_deploy
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
parent
d680c8a5f1
commit
7d6b1b5236
2 changed files with 38 additions and 15 deletions
|
@ -226,21 +226,6 @@ ___cdist_lib_path()
|
|||
echo $_
|
||||
}
|
||||
|
||||
__cdist_init_deploy()
|
||||
{
|
||||
__cdist_echo info "Creating clean directory structure "
|
||||
|
||||
# Ensure there is no old stuff, neither local nor remote
|
||||
rm -rf "$__cdist_local_base_dir"
|
||||
ssh "${__cdist_remote_user}@$1" "rm -rf ${__cdist_remote_base_dir}"
|
||||
|
||||
# Init base
|
||||
mkdir -p "$__cdist_local_base_dir"
|
||||
ssh "${__cdist_remote_user}@$1" "mkdir -p ${__cdist_remote_base_dir}"
|
||||
|
||||
# Link configuration source directory - consistent with remote
|
||||
ln -sf "$__cdist_conf_dir" "$__cdist_local_base_dir/$__cdist_name_conf_dir"
|
||||
}
|
||||
|
||||
################################################################################
|
||||
# Cache
|
||||
|
|
38
core/__cdist_init_deploy
Executable file
38
core/__cdist_init_deploy
Executable file
|
@ -0,0 +1,38 @@
|
|||
#!/bin/sh
|
||||
#
|
||||
# 2011 Nico Schottelius (nico-cdist at schottelius.org)
|
||||
#
|
||||
# This file is part of cdist.
|
||||
#
|
||||
# cdist is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# cdist is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
#
|
||||
# Prepare deployment
|
||||
#
|
||||
|
||||
__cdist_init_deploy()
|
||||
{
|
||||
__cdist_echo info "Creating clean directory structure "
|
||||
|
||||
# Ensure there is no old stuff, neither local nor remote
|
||||
rm -rf "$__cdist_local_base_dir"
|
||||
ssh "${__cdist_remote_user}@$1" "rm -rf ${__cdist_remote_base_dir}"
|
||||
|
||||
# Init base
|
||||
mkdir -p "$__cdist_local_base_dir"
|
||||
ssh "${__cdist_remote_user}@$1" "mkdir -p ${__cdist_remote_base_dir}"
|
||||
|
||||
# Link configuration source directory - consistent with remote
|
||||
ln -sf "$__cdist_conf_dir" "$__cdist_local_base_dir/$__cdist_name_conf_dir"
|
||||
}
|
Loading…
Reference in a new issue