From 92e67182a65c9421dc1a65e5de545c18bca46606 Mon Sep 17 00:00:00 2001 From: Daniel Heule Date: Tue, 21 Jan 2014 22:24:35 +0100 Subject: [PATCH] parameter default handling in __cdist type corrected --- cdist/conf/type/__cdist/manifest | 18 +++--------------- .../conf/type/__cdist/parameter/default/branch | 1 + .../conf/type/__cdist/parameter/default/source | 1 + .../type/__cdist/parameter/default/username | 1 + 4 files changed, 6 insertions(+), 15 deletions(-) create mode 100644 cdist/conf/type/__cdist/parameter/default/branch create mode 100644 cdist/conf/type/__cdist/parameter/default/source create mode 100644 cdist/conf/type/__cdist/parameter/default/username diff --git a/cdist/conf/type/__cdist/manifest b/cdist/conf/type/__cdist/manifest index 44d62f6c..7c0ae60e 100755 --- a/cdist/conf/type/__cdist/manifest +++ b/cdist/conf/type/__cdist/manifest @@ -27,23 +27,11 @@ else shell="" fi -if [ -f "$__object/parameter/username" ]; then - username="$(cat "$__object/parameter/username")" -else - username="cdist" -fi +username="$(cat "$__object/parameter/username")" -if [ -f "$__object/parameter/branch" ]; then - branch="$(cat "$__object/parameter/branch")" -else - branch="master" -fi +branch="$(cat "$__object/parameter/branch")" -if [ -f "$__object/parameter/source" ]; then - source="$(cat "$__object/parameter/source")" -else - source="git://github.com/telmich/cdist.git" -fi +source="$(cat "$__object/parameter/source")" # Currently hardcoded - if anyone cares, make a parameter # out of it diff --git a/cdist/conf/type/__cdist/parameter/default/branch b/cdist/conf/type/__cdist/parameter/default/branch new file mode 100644 index 00000000..1f7391f9 --- /dev/null +++ b/cdist/conf/type/__cdist/parameter/default/branch @@ -0,0 +1 @@ +master diff --git a/cdist/conf/type/__cdist/parameter/default/source b/cdist/conf/type/__cdist/parameter/default/source new file mode 100644 index 00000000..d669308f --- /dev/null +++ b/cdist/conf/type/__cdist/parameter/default/source @@ -0,0 +1 @@ +git://github.com/telmich/cdist.git diff --git a/cdist/conf/type/__cdist/parameter/default/username b/cdist/conf/type/__cdist/parameter/default/username new file mode 100644 index 00000000..a585e141 --- /dev/null +++ b/cdist/conf/type/__cdist/parameter/default/username @@ -0,0 +1 @@ +cdist