forked from ungleich-public/cdist
Merge remote-tracking branch 'steven/issue/236'
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org> Conflicts: cdist/conf/type/__user/gencode-remote
This commit is contained in:
commit
d288acbe30
2 changed files with 6 additions and 0 deletions
|
@ -58,10 +58,12 @@ if grep -q "^${name}:" "$__object/explorer/group"; then
|
||||||
|
|
||||||
if [ "$new_value" != "$current_value" ]; then
|
if [ "$new_value" != "$current_value" ]; then
|
||||||
set -- "$@" "$proparg" \"$new_value\"
|
set -- "$@" "$proparg" \"$new_value\"
|
||||||
|
echo change $property $new_value $current_value >> "$__messages_out"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ $# -gt 0 ]; then
|
if [ $# -gt 0 ]; then
|
||||||
|
echo mod >> "$__messages_out"
|
||||||
case $os in
|
case $os in
|
||||||
freebsd)
|
freebsd)
|
||||||
echo pw group mod "$@" "$name"
|
echo pw group mod "$@" "$name"
|
||||||
|
@ -72,6 +74,7 @@ if grep -q "^${name}:" "$__object/explorer/group"; then
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
echo add >> "$__messages_out"
|
||||||
for property in $(ls .); do
|
for property in $(ls .); do
|
||||||
new_value="$(cat "$property")"
|
new_value="$(cat "$property")"
|
||||||
if [ "$os" = "freebsd" ]; then
|
if [ "$os" = "freebsd" ]; then
|
||||||
|
@ -95,6 +98,7 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
set -- "$@" "$proparg" \"$new_value\"
|
set -- "$@" "$proparg" \"$new_value\"
|
||||||
|
echo set $property $new_value >> "$__messages_out"
|
||||||
done
|
done
|
||||||
|
|
||||||
case $os in
|
case $os in
|
||||||
|
|
|
@ -102,6 +102,7 @@ if [ "$state" = "present" ]; then
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ $# -gt 0 ]; then
|
if [ $# -gt 0 ]; then
|
||||||
|
echo mod >> "$__messages_out"
|
||||||
if [ "$os" = "freebsd" ]; then
|
if [ "$os" = "freebsd" ]; then
|
||||||
echo pw usermod "$@" "$name"
|
echo pw usermod "$@" "$name"
|
||||||
else
|
else
|
||||||
|
@ -111,6 +112,7 @@ if [ "$state" = "present" ]; then
|
||||||
true
|
true
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
|
echo add >> "$__messages_out"
|
||||||
for property in $(ls .); do
|
for property in $(ls .); do
|
||||||
[ "$property" = "state" ] && continue
|
[ "$property" = "state" ] && continue
|
||||||
[ "$property" = "remove-home" ] && continue
|
[ "$property" = "remove-home" ] && continue
|
||||||
|
|
Loading…
Reference in a new issue