From c6ad2e60b393c6e48c62ae76f7ed82b9d6c4e072 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Thu, 26 Jun 2014 17:11:35 +0200 Subject: [PATCH] remove obsolete todos ... people believe they still need to be fixed! Signed-off-by: Nico Schottelius --- cdist/conf/type/__block/explorer/block | 27 ++++++++++++++++++++++---- cdist/conf/type/__block/gencode-remote | 2 +- docs/dev/todo/TAKEME | 8 -------- 3 files changed, 24 insertions(+), 13 deletions(-) diff --git a/cdist/conf/type/__block/explorer/block b/cdist/conf/type/__block/explorer/block index 6c35bc46..e1ca3441 100755 --- a/cdist/conf/type/__block/explorer/block +++ b/cdist/conf/type/__block/explorer/block @@ -1,5 +1,24 @@ #!/bin/sh -# 2013 Steven Armstrong (steven-cdist at armstrong.cc) +# +# 2013 Steven Armstrong (steven-cdist armstrong.cc) +# 2014 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="$(cat "$__object/parameter/file" 2>/dev/null || echo "/$__object_id")" @@ -8,12 +27,12 @@ file="$(cat "$__object/parameter/file" 2>/dev/null || echo "/$__object_id")" prefix=$(cat "$__object/parameter/prefix" 2>/dev/null || echo "#cdist:__block/$__object_id") suffix=$(cat "$__object/parameter/suffix" 2>/dev/null || echo "#/cdist:__block/$__object_id") -awk -v prefix="$prefix" -v suffix="$suffix" '{ - if (index($0,prefix)) { +awk -v prefix="^$prefix\$" -v suffix="^$suffix\$" '{ + if (match($0,prefix)) { triggered=1 } if (triggered) { - if (index($0,suffix)) { + if (match($0,suffix)) { triggered=0 } print diff --git a/cdist/conf/type/__block/gencode-remote b/cdist/conf/type/__block/gencode-remote index 0a5eea18..973e9922 100755 --- a/cdist/conf/type/__block/gencode-remote +++ b/cdist/conf/type/__block/gencode-remote @@ -46,7 +46,7 @@ tmpfile=\$(mktemp ${file}.cdist.XXXXXXXXXX) if [ -f "$file" ]; then cp -p "$file" "\$tmpfile" fi -awk -v prefix="$prefix" -v suffix="$suffix" ' +awk -v prefix="^$prefix\\\$" -v suffix="^$suffix\\\$" ' { if (index(\$0,prefix)) { triggered=1 diff --git a/docs/dev/todo/TAKEME b/docs/dev/todo/TAKEME index 87fc91c5..4d097091 100644 --- a/docs/dev/todo/TAKEME +++ b/docs/dev/todo/TAKEME @@ -5,10 +5,6 @@ Feel free to pick one! CORE ---- -- support default parameter -- document and add paremeters for remote-copy and remote-exec! - - remove hack, make a feature of it - - remove var=foo calls on remote side. Use -o SendEnv (yeah, see ssh_config(5)) TESTS @@ -23,9 +19,6 @@ TESTS USER INTERFACE -------------- -- How to cleanly implement "restart service if config file changed" - -> document - - Cache - add example how to use - export variable $__cache @@ -45,7 +38,6 @@ TYPES - Add testing framework (proposed by Evax Software) - __user add option to include --create-home -- Merge __addifnosuchline and __removeline into __line + --state present|absent - __cron: Support --file to be used instead of user cron (probably direct support of /etc/cron.d)