forked from ungleich-public/cdist
rename manifest -> manifests and use subshell in__cdist_object_list()
Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
parent
7f96e30971
commit
662eee7ea3
1 changed files with 14 additions and 5 deletions
|
@ -33,7 +33,12 @@
|
||||||
: ${__cdist_name_gencode:=gencode}
|
: ${__cdist_name_gencode:=gencode}
|
||||||
: ${__cdist_name_host:=hosts}
|
: ${__cdist_name_host:=hosts}
|
||||||
: ${__cdist_name_init:=init}
|
: ${__cdist_name_init:=init}
|
||||||
: ${__cdist_name_manifest:=manifests}
|
|
||||||
|
# Name of the manifest file in types
|
||||||
|
: ${__cdist_name_manifest:=manifest}
|
||||||
|
|
||||||
|
# Name of the base directory containing the initial manifests
|
||||||
|
: ${__cdist_name_manifests:=manifests}
|
||||||
: ${__cdist_name_object:=objects}
|
: ${__cdist_name_object:=objects}
|
||||||
|
|
||||||
: ${__cdist_name_type:=types}
|
: ${__cdist_name_type:=types}
|
||||||
|
@ -54,7 +59,7 @@
|
||||||
# Base
|
# Base
|
||||||
: ${__cdist_config:=/etc/cdist}
|
: ${__cdist_config:=/etc/cdist}
|
||||||
: ${__cdist_explorer_dir:=$__cdist_config/$__cdist_name_explorer}
|
: ${__cdist_explorer_dir:=$__cdist_config/$__cdist_name_explorer}
|
||||||
: ${__cdist_manifest_dir:=$__cdist_config/$__cdist_name_manifest}
|
: ${__cdist_manifest_dir:=$__cdist_config/$__cdist_name_manifests}
|
||||||
: ${__cdist_manifest_init:=$__cdist_manifest_dir/$__cdist_name_init}
|
: ${__cdist_manifest_init:=$__cdist_manifest_dir/$__cdist_name_init}
|
||||||
: ${__cdist_type_dir:=$__cdist_config/$__cdist_name_type}
|
: ${__cdist_type_dir:=$__cdist_config/$__cdist_name_type}
|
||||||
|
|
||||||
|
@ -151,10 +156,14 @@ __cdist_object_list()
|
||||||
{
|
{
|
||||||
local basedir="$1"; shift
|
local basedir="$1"; shift
|
||||||
|
|
||||||
cd "${basedir}"
|
# Use subshell to prevent changing cwd in program
|
||||||
|
(
|
||||||
|
cd "${basedir}"
|
||||||
|
|
||||||
|
find . -name "$__cdist_name_object_source" | \
|
||||||
|
sed -e "s;$__cdist_name_object_source\$;;" -e 's;^./;;'
|
||||||
|
)
|
||||||
|
|
||||||
find . -name "$__cdist_name_object_source" | \
|
|
||||||
sed -e "s;$__cdist_name_object_source\$;;" -e 's;^./;;'
|
|
||||||
}
|
}
|
||||||
|
|
||||||
__cdist_object_source()
|
__cdist_object_source()
|
||||||
|
|
Loading…
Reference in a new issue