From 1fddf723fe30cc2ba35d96a1c11069050c312e00 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Mon, 27 Jul 2020 13:18:09 +0200 Subject: [PATCH] [users] FreeBSD support creating groups --- src/modules/users/CreateUserJob.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/modules/users/CreateUserJob.cpp b/src/modules/users/CreateUserJob.cpp index 2031aa029..8927af8ab 100644 --- a/src/modules/users/CreateUserJob.cpp +++ b/src/modules/users/CreateUserJob.cpp @@ -81,7 +81,11 @@ ensureGroupsExistInTarget( const QStringList& wantedGroups, const QStringList& a { if ( !availableGroups.contains( group ) ) { +#ifdef __FreeBSD__ + CalamaresUtils::System::instance()->targetEnvCall( { "pw", "groupadd", "-n", group } ); +#else CalamaresUtils::System::instance()->targetEnvCall( { "groupadd", group } ); +#endif } } }