base-files: the USERID code path did not check for duplicate groups
[openwrt.git] / 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=$?