implement messaging for __user type

Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
Steven Armstrong 2013-12-19 11:21:44 +01:00
parent 9d54eb7257
commit 80fffbad11

View file

@ -89,10 +89,12 @@ if grep -q "^${name}:" "$__object/explorer/passwd"; then
if [ "$new_value" != "$current_value" ]; then if [ "$new_value" != "$current_value" ]; then
set -- "$@" "$(shorten_property $property)" \'$new_value\' set -- "$@" "$(shorten_property $property)" \'$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"
if [ "$os" = "freebsd" ]; then if [ "$os" = "freebsd" ]; then
echo pw usermod "$@" "$name" echo pw usermod "$@" "$name"
else else
@ -102,12 +104,15 @@ if grep -q "^${name}:" "$__object/explorer/passwd"; then
true true
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 [ -z "$new_value" ];then # Boolean values have no value if [ -z "$new_value" ];then # Boolean values have no value
set -- "$@" "$(shorten_property $property)" set -- "$@" "$(shorten_property $property)"
echo set $property >> "$__messages_out"
else else
set -- "$@" "$(shorten_property $property)" \'$new_value\' set -- "$@" "$(shorten_property $property)" \'$new_value\'
echo set $property $new_value >> "$__messages_out"
fi fi
done done