Make sure tests fail by exiting a non nul value.
This commit is contained in:
@@ -23,7 +23,7 @@ chown -R foo:foo /var/mail/foo
|
||||
chown -R root:root /home/foo
|
||||
|
||||
echo -n "Delete user foo (userdel -r foo)..."
|
||||
userdel -r foo 2>tmp/userdel.err && exit || {
|
||||
userdel -r foo 2>tmp/userdel.err && exit 1 || {
|
||||
status=$?
|
||||
}
|
||||
echo "OK"
|
||||
|
||||
@@ -17,7 +17,7 @@ trap 'log_status "$0" "FAILURE"; restore_config' 0
|
||||
change_config
|
||||
|
||||
echo -n "Change the user's list of supplementary groups (usermod -G bin,damon foo)..."
|
||||
usermod -G bin,damon foo 2>tmp/usermod.err && exit || {
|
||||
usermod -G bin,damon foo 2>tmp/usermod.err && exit 1 || {
|
||||
status=$?
|
||||
}
|
||||
echo "OK"
|
||||
|
||||
+1
-1
@@ -17,7 +17,7 @@ trap 'log_status "$0" "FAILURE"; restore_config' 0
|
||||
change_config
|
||||
|
||||
echo -n "Change the user's list of supplementary groups (usermod -G bin,4242,daemon foo)..."
|
||||
usermod -G bin,4242,daemon foo 2>tmp/usermod.err && exit || {
|
||||
usermod -G bin,4242,daemon foo 2>tmp/usermod.err && exit 1 || {
|
||||
status=$?
|
||||
}
|
||||
echo "OK"
|
||||
|
||||
@@ -21,7 +21,7 @@ touch /etc/passwd.lock
|
||||
echo "done"
|
||||
|
||||
echo -n "Change the user's list of supplementary groups (usermod -G bin foo)..."
|
||||
usermod -G bin foo 2>tmp/usermod.err && exit || {
|
||||
usermod -G bin foo 2>tmp/usermod.err && exit 1 || {
|
||||
status=$?
|
||||
}
|
||||
echo "OK"
|
||||
|
||||
@@ -21,7 +21,7 @@ touch /etc/group.lock
|
||||
echo "done"
|
||||
|
||||
echo -n "Change the user's list of supplementary groups (usermod -G bin foo)..."
|
||||
usermod -G bin foo 2>tmp/usermod.err && exit || {
|
||||
usermod -G bin foo 2>tmp/usermod.err && exit 1 || {
|
||||
status=$?
|
||||
}
|
||||
echo "OK"
|
||||
|
||||
@@ -21,7 +21,7 @@ touch /etc/shadow.lock
|
||||
echo "done"
|
||||
|
||||
echo -n "Change the user's list of supplementary groups (usermod -G bin foo)..."
|
||||
usermod -G bin foo 2>tmp/usermod.err && exit || {
|
||||
usermod -G bin foo 2>tmp/usermod.err && exit 1 || {
|
||||
status=$?
|
||||
}
|
||||
echo "OK"
|
||||
|
||||
@@ -21,7 +21,7 @@ touch /etc/gshadow.lock
|
||||
echo "done"
|
||||
|
||||
echo -n "Change the user's list of supplementary groups (usermod -G bin foo)..."
|
||||
usermod -G bin foo 2>tmp/usermod.err && exit || {
|
||||
usermod -G bin foo 2>tmp/usermod.err && exit 1 || {
|
||||
status=$?
|
||||
}
|
||||
echo "OK"
|
||||
|
||||
@@ -21,7 +21,7 @@ touch /etc/group.lock
|
||||
echo "done"
|
||||
|
||||
echo -n "Change the user's list of supplementary groups (usermod -l foo2 foo)..."
|
||||
usermod -l foo2 foo 2>tmp/usermod.err && exit || {
|
||||
usermod -l foo2 foo 2>tmp/usermod.err && exit 1 || {
|
||||
status=$?
|
||||
}
|
||||
echo "OK"
|
||||
|
||||
@@ -21,7 +21,7 @@ touch /etc/gshadow.lock
|
||||
echo "done"
|
||||
|
||||
echo -n "Change the user's list of supplementary groups (usermod -l foo2 foo)..."
|
||||
usermod -l foo2 foo 2>tmp/usermod.err && exit || {
|
||||
usermod -l foo2 foo 2>tmp/usermod.err && exit 1 || {
|
||||
status=$?
|
||||
}
|
||||
echo "OK"
|
||||
|
||||
@@ -17,7 +17,7 @@ trap 'log_status "$0" "FAILURE"; restore_config' 0
|
||||
change_config
|
||||
|
||||
echo -n "Change the user's UID (usermod -u 1001 foo)..."
|
||||
usermod -u 1001 foo 2>tmp/usermod.err && exit || {
|
||||
usermod -u 1001 foo 2>tmp/usermod.err && exit 1 || {
|
||||
status=$?
|
||||
}
|
||||
echo "OK"
|
||||
|
||||
@@ -17,7 +17,7 @@ trap 'log_status "$0" "FAILURE"; restore_config' 0
|
||||
change_config
|
||||
|
||||
echo -n "Change the user's UID (usermod -u 100a1 foo)..."
|
||||
usermod -u 100a1 foo 2>tmp/usermod.err && exit || {
|
||||
usermod -u 100a1 foo 2>tmp/usermod.err && exit 1 || {
|
||||
status=$?
|
||||
}
|
||||
echo "OK"
|
||||
|
||||
Reference in New Issue
Block a user