mirror of
https://github.com/lxc/incus.git
synced 2026-02-05 09:46:19 +01:00
incus-user: Use shorter interrface name for long UIDs
Closes #972 Signed-off-by: Stéphane Graber <stgraber@stgraber.org>
This commit is contained in:
@@ -153,6 +153,11 @@ func serverInitialConfiguration(client incus.InstanceServer) error {
|
||||
func serverSetupUser(uid uint32) error {
|
||||
projectName := fmt.Sprintf("user-%d", uid)
|
||||
networkName := fmt.Sprintf("incusbr-%d", uid)
|
||||
if len(networkName) > 15 {
|
||||
// For long UIDs, use a shorter slightly less descriptive interface name.
|
||||
networkName = fmt.Sprintf("user-%d", uid)
|
||||
}
|
||||
|
||||
userPath := internalUtil.VarPath("users", fmt.Sprintf("%d", uid))
|
||||
|
||||
// User account.
|
||||
|
||||
Reference in New Issue
Block a user