Commit b2aeceae authored by Daniel Heule's avatar Daniel Heule

minor optimisation ...

parent e89ca14e
......@@ -23,11 +23,9 @@ state_should="$(cat "$__object/parameter/state")"
oldusermod="$(cat "$__object/explorer/oldusermod")"
if [ "$oldusermod" = "true" ]; then
old=yes
addparam="-A"
delparam="-R"
else
old=no
addparam="-a"
delparam="-d"
fi
......@@ -53,9 +51,9 @@ if [ -z "$changed_groups" ]; then
fi
for group in $changed_groups; do
if [ "$old" = "no" ]; then
echo "gpasswd $action \"$user\" \"$group\""
else
if [ "$oldusermod" = "true" ]; then
echo "usermod $action \"$group\" \"$user\""
else
echo "gpasswd $action \"$user\" \"$group\""
fi
done
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment