From a858085afb46922760d9e89c34feb988ea283a54 Mon Sep 17 00:00:00 2001
From: Thomas Bechtold <tbechtold@suse.com>
Date: Sun, 31 May 2015 00:04:33 +0200
Subject: [PATCH] Simplify add_user_to_group function

Current SLE12 and openSUSE13.X versions can handle usermod's '-a' and '-G'
switches so remove the special case.

Change-Id: If0f1390a0eb8f41ffffca74525a4648cfe8ea61d
---
 functions-common | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/functions-common b/functions-common
index ff9261161c..3a2f5f7f41 100644
--- a/functions-common
+++ b/functions-common
@@ -1842,16 +1842,7 @@ function add_user_to_group {
     local user=$1
     local group=$2
 
-    if [[ -z "$os_VENDOR" ]]; then
-        GetOSVersion
-    fi
-
-    # SLE11 and openSUSE 12.2 don't have the usual usermod
-    if ! is_suse || [[ "$os_VENDOR" = "openSUSE" && "$os_RELEASE" != "12.2" ]]; then
-        sudo usermod -a -G "$group" "$user"
-    else
-        sudo usermod -A "$group" "$user"
-    fi
+    sudo usermod -a -G "$group" "$user"
 }
 
 # Convert CIDR notation to a IPv4 netmask