base-files: the USERID code path did not check for duplicate groups
authorJohn Crispin <john@openwrt.org>
Tue, 14 Oct 2014 19:01:05 +0000 (19:01 +0000)
committerJohn Crispin <john@openwrt.org>
Tue, 14 Oct 2014 19:01:05 +0000 (19:01 +0000)
Signed-off-by: John Crispin <blogic@openwrt.org>
SVN-Revision: 42919

package/base-files/files/lib/functions.sh

index 6f22dd0..b88d4d6 100755 (executable)
@@ -193,7 +193,7 @@ default_postinst() {
                                }
 
                                gid=$id
-                               [ -n "$gid" ] && group_add $name $gid
+                               [ -n "$gid" ] && group_exists $name || group_add $name $gid
                                [ -z "$gid" ] && {
                                        group_add_next $name
                                        gid=$?