import latest changes from private repo
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
parent
8c1aa87296
commit
2e61f54c11
5 changed files with 10 additions and 26 deletions
|
@ -17,12 +17,6 @@
|
|||
# You should have received a copy of the GNU General Public License
|
||||
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
#
|
||||
# Handle directories
|
||||
#
|
||||
#
|
||||
# __directory /etc [--mode --owner --group --parents [yes|no] ]
|
||||
#
|
||||
|
||||
destination="/$__object_id"
|
||||
state_should="$(cat "$__object/parameter/state")"
|
||||
|
|
|
@ -18,8 +18,6 @@
|
|||
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
if [ -f "$__object/parameter/state" ]; then
|
||||
state="$(cat "$__object/parameter/state")"
|
||||
else
|
||||
echo "present" > "$__object/parameter/state"
|
||||
fi
|
||||
# set defaults
|
||||
state="$(cat "$__object/parameter/state" 2>/dev/null \
|
||||
|| echo "present" | tee "$__object/parameter/state")"
|
||||
|
|
|
@ -33,11 +33,7 @@ if [ "$state_should" = "present" ]; then
|
|||
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}"
|
||||
echo "$__remote_copy" "$source" "${__target_host}:${destination}"
|
||||
fi
|
||||
else
|
||||
echo "Source \"$source\" does not exist." >&2
|
||||
|
|
|
@ -20,8 +20,6 @@
|
|||
|
||||
name="$__object_id"
|
||||
|
||||
if [ -f "$__object/parameter/state" ]; then
|
||||
state="$(cat "$__object/parameter/state")"
|
||||
else
|
||||
echo "present" > "$__object/parameter/state"
|
||||
fi
|
||||
# set defaults
|
||||
state="$(cat "$__object/parameter/state" 2>/dev/null \
|
||||
|| echo "present" | tee "$__object/parameter/state")"
|
||||
|
|
|
@ -18,8 +18,6 @@
|
|||
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
|
||||
#
|
||||
|
||||
if [ -f "$__object/parameter/state" ]; then
|
||||
state="$(cat "$__object/parameter/state")"
|
||||
else
|
||||
echo "present" > "$__object/parameter/state"
|
||||
fi
|
||||
# set defaults
|
||||
state="$(cat "$__object/parameter/state" 2>/dev/null \
|
||||
|| echo "present" | tee "$__object/parameter/state")"
|
||||
|
|
Loading…
Reference in a new issue