Fix unbound variable errors

This commit is contained in:
2022-06-02 16:08:07 +02:00
parent a6eeccb417
commit 4f8c1b5388
15 changed files with 85 additions and 86 deletions

View File

@@ -218,7 +218,7 @@ step_103_info() { echo "(re)Set passwort for <USER>"; }
step_103_alias() { echo "passwd"; }
step_103() {
shift
if [ ! -z $1 ] ; then
if [ -n "${1:-}" ] ; then
echo " [I] Password operation for $1"
userId="$1"
elif [ ! -z $userId ] ; then
@@ -234,7 +234,7 @@ step_105_info() { echo "Adding <USER ID> to existing group <GROUP NAME>"; }
step_105_alias() { echo "user2group"; }
step_105() {
shift
if [ ! -z $1 ] ; then
if [ -n "${1:-}" ] ; then
userId="$1"
echo " [I] User operation for $userId"
elif [ ! -z $userId ] ; then
@@ -269,7 +269,7 @@ step_107_info() { echo "Removing <USER ID> from existing group <GROUP NAME>"; }
step_107_alias() { echo "rmusergroup"; }
step_107() {
shift
if [ ! -z $1 ] ; then
if [ -n "${1:-}" ] ; then
userId="$1"
echo " [I] User operation for $userId"
elif [ ! -z $userId ] ; then