import latest changes from private repo

Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
Steven Armstrong 2012-01-09 10:51:53 +01:00
parent 8c1aa87296
commit 2e61f54c11
5 changed files with 10 additions and 26 deletions

View file

@ -17,12 +17,6 @@
# You should have received a copy of the GNU General Public License # You should have received a copy of the GNU General Public License
# along with cdist. If not, see <http://www.gnu.org/licenses/>. # along with cdist. If not, see <http://www.gnu.org/licenses/>.
# #
#
# Handle directories
#
#
# __directory /etc [--mode --owner --group --parents [yes|no] ]
#
destination="/$__object_id" destination="/$__object_id"
state_should="$(cat "$__object/parameter/state")" state_should="$(cat "$__object/parameter/state")"

View file

@ -18,8 +18,6 @@
# along with cdist. If not, see <http://www.gnu.org/licenses/>. # along with cdist. If not, see <http://www.gnu.org/licenses/>.
# #
if [ -f "$__object/parameter/state" ]; then # set defaults
state="$(cat "$__object/parameter/state")" state="$(cat "$__object/parameter/state" 2>/dev/null \
else || echo "present" | tee "$__object/parameter/state")"
echo "present" > "$__object/parameter/state"
fi

View file

@ -33,11 +33,7 @@ if [ "$state_should" = "present" ]; then
remote_cksum="$(cat "$__object/explorer/cksum")" remote_cksum="$(cat "$__object/explorer/cksum")"
if [ "$local_cksum" != "$remote_cksum" ]; then if [ "$local_cksum" != "$remote_cksum" ]; then
# FIXME: The username is ugly and hardcoded, replace after 1.0! echo "$__remote_copy" "$source" "${__target_host}:${destination}"
# 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 fi
else else
echo "Source \"$source\" does not exist." >&2 echo "Source \"$source\" does not exist." >&2

View file

@ -20,8 +20,6 @@
name="$__object_id" name="$__object_id"
if [ -f "$__object/parameter/state" ]; then # set defaults
state="$(cat "$__object/parameter/state")" state="$(cat "$__object/parameter/state" 2>/dev/null \
else || echo "present" | tee "$__object/parameter/state")"
echo "present" > "$__object/parameter/state"
fi

View file

@ -18,8 +18,6 @@
# along with cdist. If not, see <http://www.gnu.org/licenses/>. # along with cdist. If not, see <http://www.gnu.org/licenses/>.
# #
if [ -f "$__object/parameter/state" ]; then # set defaults
state="$(cat "$__object/parameter/state")" state="$(cat "$__object/parameter/state" 2>/dev/null \
else || echo "present" | tee "$__object/parameter/state")"
echo "present" > "$__object/parameter/state"
fi