do not change parameters

Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
This commit is contained in:
Nico Schottelius 2014-01-20 13:50:42 +01:00
parent 5279b7239c
commit 29d4f910bc
2 changed files with 8 additions and 6 deletions

View file

@ -1,6 +1,7 @@
#!/bin/sh
#
# 2014 Steven Armstrong (steven-cdist at armstrong.cc)
# 2014 Nico Schottelius (nico-cdist at schottelius.org)
#
# This file is part of cdist.
#
@ -18,7 +19,12 @@
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
#
name="$(cat "$__object/parameter/name")"
if [ -f "$__object/parameter/name" ]; then
name="$(cat "$__object/parameter/name")"
else
name="$__target_host"
fi
os=$(cat "$__global/explorer/os")
echo "printf '%s\n' '$name' > /etc/hostname"

View file

@ -1,6 +1,7 @@
#!/bin/sh
#
# 2012 Steven Armstrong (steven-cdist at armstrong.cc)
# 2014 Nico Schottelius (nico-cdist at schottelius.org)
#
# This file is part of cdist.
#
@ -18,10 +19,6 @@
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
#
# set defaults
name="$(cat "$__object/parameter/name" 2>/dev/null \
|| echo "${__target_host%%.*}" | tee "$__object/parameter/name")"
os=$(cat "$__global/explorer/os")
not_supported() {
@ -33,7 +30,6 @@ not_supported() {
case "$os" in
archlinux|debian|ubuntu)
# handled in gencode-remote
# FIXED: hostname setup in archlinuz via rc.local ist outdated
:
;;
*)