do not fail if nothing todo (__user and __group)

Signed-off-by: Nico Schottelius <nico@kr.ethz.ch>
This commit is contained in:
Nico Schottelius 2011-04-06 22:24:11 +02:00
parent ad9cac5fb6
commit 3c37ac0b0f
2 changed files with 10 additions and 2 deletions

View File

@ -43,7 +43,11 @@ if grep -q "^${name}:" "$__object/explorer/group"; then
fi
done
[ $# -gt 0 ] && echo groupmod $@ $name
if [ $# -gt 0 ]; then
echo groupmod "$@" "$name"
else
true
fi
else
for property in $(ls .); do
new_value="$(cat "$property")"

View File

@ -59,7 +59,11 @@ if grep -q "^${name}:" "$__object/explorer/passwd"; then
fi
done
[ $# -gt 0 ] && echo usermod "$@" "$name"
if [ $# -gt 0 ]; then
echo usermod "$@" "$name"
else
true
fi
else
for property in $(ls .); do
new_value="$(cat "$property")"