force flag isn't required when admin group exists since it's there by default

This commit is contained in:
Serghey Rodin 2019-02-20 17:59:06 +02:00
commit 561d7e9f01
2 changed files with 4 additions and 4 deletions

View file

@ -260,7 +260,7 @@ if [ "x$(id -u)" != 'x0' ]; then
fi fi
# Checking admin user account # Checking admin user account
if [ ! -z "$(grep ^admin: /etc/passwd /etc/group)" ] && [ -z "$force" ]; then if [ ! -z "$(grep ^admin: /etc/passwd)" ] && [ -z "$force" ]; then
echo 'Please remove admin user account before proceeding.' echo 'Please remove admin user account before proceeding.'
echo 'If you want to do it automatically run installer with -f option:' echo 'If you want to do it automatically run installer with -f option:'
echo -e "Example: bash $0 --force\n" echo -e "Example: bash $0 --force\n"
@ -1236,7 +1236,7 @@ if [ ! -z "$(grep ^admin: /etc/passwd)" ] && [ "$force" = 'yes' ]; then
mv -f /home/admin $vst_backups/home/ >/dev/null 2>&1 mv -f /home/admin $vst_backups/home/ >/dev/null 2>&1
rm -f /tmp/sess_* >/dev/null 2>&1 rm -f /tmp/sess_* >/dev/null 2>&1
fi fi
if [ ! -z "$(grep ^admin: /etc/group)" ] && [ "$force" = 'yes' ]; then if [ ! -z "$(grep ^admin: /etc/group)" ]; then
groupdel admin > /dev/null 2>&1 groupdel admin > /dev/null 2>&1
fi fi

View file

@ -240,7 +240,7 @@ if [ "x$(id -u)" != 'x0' ]; then
fi fi
# Checking admin user account # Checking admin user account
if [ ! -z "$(grep ^admin: /etc/passwd /etc/group)" ] && [ -z "$force" ]; then if [ ! -z "$(grep ^admin: /etc/passwd)" ] && [ -z "$force" ]; then
echo 'Please remove admin user account before proceeding.' echo 'Please remove admin user account before proceeding.'
echo 'If you want to do it automatically run installer with -f option:' echo 'If you want to do it automatically run installer with -f option:'
echo -e "Example: bash $0 --force\n" echo -e "Example: bash $0 --force\n"
@ -1213,7 +1213,7 @@ if [ ! -z "$(grep ^admin: /etc/passwd)" ] && [ "$force" = 'yes' ]; then
mv -f /home/admin $vst_backups/home/ >/dev/null 2>&1 mv -f /home/admin $vst_backups/home/ >/dev/null 2>&1
rm -f /tmp/sess_* >/dev/null 2>&1 rm -f /tmp/sess_* >/dev/null 2>&1
fi fi
if [ ! -z "$(grep ^admin: /etc/group)" ] && [ "$force" = 'yes' ]; then if [ ! -z "$(grep ^admin: /etc/group)" ]; then
groupdel admin > /dev/null 2>&1 groupdel admin > /dev/null 2>&1
fi fi