From 8ab408f890970a92d88ccf39c770a37c10d58fa9 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Wed, 7 Nov 2012 17:52:05 +0100 Subject: [PATCH] remove parameter change code Signed-off-by: Nico Schottelius --- cdist/conf/type/__file/gencode-local | 5 +++-- cdist/conf/type/__file/gencode-remote | 5 +++-- cdist/conf/type/__file/manifest | 24 ------------------------ 3 files changed, 6 insertions(+), 28 deletions(-) delete mode 100755 cdist/conf/type/__file/manifest diff --git a/cdist/conf/type/__file/gencode-local b/cdist/conf/type/__file/gencode-local index a6c55abf..087011c4 100755 --- a/cdist/conf/type/__file/gencode-local +++ b/cdist/conf/type/__file/gencode-local @@ -1,6 +1,6 @@ #!/bin/sh # -# 2011 Nico Schottelius (nico-cdist at schottelius.org) +# 2011-2012 Nico Schottelius (nico-cdist at schottelius.org) # # This file is part of cdist. # @@ -22,7 +22,8 @@ # destination="/$__object_id" -state_should="$(cat "$__object/parameter/state")" +state_should=present +[ -f "$__object/parameter/state" ] && state_should="$(cat "$__object/parameter/state")" exists="$(cat "$__object/explorer/exists")" [ "$state_should" = "exists" -a "$exists" = "yes" ] && exit 0 # nothing to do diff --git a/cdist/conf/type/__file/gencode-remote b/cdist/conf/type/__file/gencode-remote index 04a1ea78..8b03e919 100755 --- a/cdist/conf/type/__file/gencode-remote +++ b/cdist/conf/type/__file/gencode-remote @@ -1,6 +1,6 @@ #!/bin/sh # -# 2011 Nico Schottelius (nico-cdist at schottelius.org) +# 2011-2012 Nico Schottelius (nico-cdist at schottelius.org) # # This file is part of cdist. # @@ -22,7 +22,8 @@ # destination="/$__object_id" -state_should="$(cat "$__object/parameter/state")" +state_should=present +[ -f "$__object/parameter/state" ] && state_should="$(cat "$__object/parameter/state")" exists="$(cat "$__object/explorer/exists")" case "$state_should" in diff --git a/cdist/conf/type/__file/manifest b/cdist/conf/type/__file/manifest deleted file mode 100755 index 6b5e1ca7..00000000 --- a/cdist/conf/type/__file/manifest +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -# -# 2011 Steven Armstrong (steven-cdist at armstrong.cc) -# 2012 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 . -# - -# set default: present, if not setup -statefile="$__object/parameter/state" -[ -f "$statefile" ] || echo present > "$statefile"