aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--NEWS2
-rwxr-xr-xuserdrake6
2 files changed, 8 insertions, 0 deletions
diff --git a/NEWS b/NEWS
index 17fbc17..9b0c06a 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+- add patch to notify of existing home directory (mga#21333)
+
Version 2.16 - 5 June 2017
- Translation updates
diff --git a/userdrake b/userdrake
index 2274013..9711db4 100755
--- a/userdrake
+++ b/userdrake
@@ -585,6 +585,12 @@ sub AddUser() {
$userEnt->Gid($u{gid});
$userEnt->ShadowMin(-1); $userEnt->ShadowMax(99999);
$userEnt->ShadowWarn(-1); $userEnt->ShadowInact(-1);
+ if ((-e $u{homedir}) && (-d $u{homedir})) {
+ my $keephomedir = $in->ask_yesorno(N("Home directory already exists"), N("The requested home directory already exists. Would you like to preserve the existing home directory?"));
+ if (!$keephomedir) {
+ return;
+ }
+ }
$ctx->UserAdd($userEnt, $is_system, $dontcreatehomedir, $homedir_perms);
$ctx->UserSetPass($userEnt, $u{passwd});
defined $us->{o}{iconval} and