From e7c1d3f16b774c3b33f7b41aa7dbec4041dd6d5c Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Sun, 27 Mar 2011 00:07:39 +0100 Subject: [PATCH] add parameter Signed-off-by: Nico Schottelius --- conf/type/__process/gencode-local | 44 -------------------------- conf/type/__process/parameter/optional | 6 ++-- conf/type/__process/parameter/required | 1 + 3 files changed, 3 insertions(+), 48 deletions(-) delete mode 100755 conf/type/__process/gencode-local create mode 100644 conf/type/__process/parameter/required diff --git a/conf/type/__process/gencode-local b/conf/type/__process/gencode-local deleted file mode 100755 index 1168919e..00000000 --- a/conf/type/__process/gencode-local +++ /dev/null @@ -1,44 +0,0 @@ -#!/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 . -# -# -# __file is a very basic type, which will probably be reused quite often -# - -destination="/$__object_id" - -if [ -f "$__object/parameter/source" ]; then - source="$(cat "$__object/parameter/source")" - - if [ -f "$source" ]; then - local_cksum="$(cksum < "$source")" - remote_cksum="$(cat "$__object/explorer/cksum")" - - if [ "$local_cksum" != "$remote_cksum" ]; then - # FIXME: The username is ugly and hardcoded, replace after 1.0! - # Probably a better aproach is to have the user configured - # ~/.ssh/config to contain the right username - # Probably describe it in cdist-quickstart... - echo scp "$source" "root@${__target_host}:${destination}" - fi - else - echo "Source \"$source\" does not exist." >&2 - exit 1 - fi -fi diff --git a/conf/type/__process/parameter/optional b/conf/type/__process/parameter/optional index 06120518..4189bb2c 100644 --- a/conf/type/__process/parameter/optional +++ b/conf/type/__process/parameter/optional @@ -1,4 +1,2 @@ -group -mode -owner -source +stop +start diff --git a/conf/type/__process/parameter/required b/conf/type/__process/parameter/required new file mode 100644 index 00000000..ff72b5c7 --- /dev/null +++ b/conf/type/__process/parameter/required @@ -0,0 +1 @@ +state