From 34c528ea5bdce7b01ac399d7686c523818a2b0b1 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 15 Jun 2012 10:03:26 +0200 Subject: [PATCH] do not change parameter information, it's evil Signed-off-by: Nico Schottelius --- conf/type/__start_on_boot/gencode-remote | 4 ++-- conf/type/__start_on_boot/manifest | 24 ------------------------ 2 files changed, 2 insertions(+), 26 deletions(-) delete mode 100755 conf/type/__start_on_boot/manifest diff --git a/conf/type/__start_on_boot/gencode-remote b/conf/type/__start_on_boot/gencode-remote index 78a82de3..7bb69ff5 100755 --- a/conf/type/__start_on_boot/gencode-remote +++ b/conf/type/__start_on_boot/gencode-remote @@ -19,10 +19,10 @@ # # -state_should="$(cat "$__object/parameter/state")" +state_should="$(cat "$__object/parameter/state" 2>/dev/null || echo present)" state_is=$(cat "$__object/explorer/state") -# Nothing todo, go away +# Short circuit if nothing is to be done [ "$state_should" = "$state_is" ] && exit 0 os=$(cat "$__global/explorer/os") diff --git a/conf/type/__start_on_boot/manifest b/conf/type/__start_on_boot/manifest deleted file mode 100755 index 6b5e1ca7..00000000 --- a/conf/type/__start_on_boot/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"