On 03/27/2013 12:15 PM, Tomas Babej wrote:
> On 03/26/2013 07:45 PM, Ana Krivokapic wrote:
>> Add the option to create home directories for users on their first login
>> to ipa-server-install and ipa-replica-install.
>>
>> https://fedorahosted.org/freeipa/ticket/3515
>>
>>
>>
>> _______________________________________________
>> Freeipa-devel mailing list
>> Freeipa-devel@redhat.com
>> https://www.redhat.com/mailman/listinfo/freeipa-devel
>
> ACK from the functional point of view.
>
> Just a nitpick, can you please reformat the patch and fix PEP8 E501
> errors?
>
> I know there's a lot of PEP8 errors and warnings in the whole project
> (and we probably need to adress this), however, let us not introduce
> new ones.
>
> Tomas

Fixed, thanks.

-- 
Regards,

Ana Krivokapic
Associate Software Engineer
FreeIPA team
Red Hat Inc.

From 53ae1472df2e7017228d11bd88f0204e8aad5b71 Mon Sep 17 00:00:00 2001
From: Ana Krivokapic <akriv...@redhat.com>
Date: Wed, 27 Mar 2013 13:48:01 +0100
Subject: [PATCH] Add mkhomedir option to ipa-server-install and
 ipa-replica-install

Add the option to create home directories for users on their
first login to ipa-server-install and ipa-replica-install.

https://fedorahosted.org/freeipa/ticket/3515
---
 install/tools/ipa-replica-install       | 8 ++++++++
 install/tools/ipa-server-install        | 8 ++++++++
 install/tools/man/ipa-replica-install.1 | 3 +++
 install/tools/man/ipa-server-install.1  | 3 +++
 4 files changed, 22 insertions(+)

diff --git a/install/tools/ipa-replica-install b/install/tools/ipa-replica-install
index 846122db30b293951695e30231c8c2ecf44815e7..94d60bec64697f775c0303b38f481129d554a0f4 100755
--- a/install/tools/ipa-replica-install
+++ b/install/tools/ipa-replica-install
@@ -70,6 +70,12 @@ def parse_options():
                       help="Directory Manager (existing master) password")
     basic_group.add_option("-w", "--admin-password", dest="admin_password", sensitive=True,
                       help="Admin user Kerberos password used for connection check")
+    basic_group.add_option("--mkhomedir",
+                           dest="mkhomedir",
+                           action="store_true",
+                           default=False,
+                           help="create home directories for users "
+                                "on their first login")
     basic_group.add_option("-N", "--no-ntp", dest="conf_ntp", action="store_false",
                       help="do not configure ntp", default=True)
     basic_group.add_option("--no-ui-redirect", dest="ui_redirect", action="store_false",
@@ -691,6 +697,8 @@ def main():
             args.append("--no-ssh")
         if not options.conf_sshd:
             args.append("--no-sshd")
+        if options.mkhomedir:
+            args.append("--mkhomedir")
         ipautil.run(args)
     except Exception, e:
         print "Configuration of client side components failed!"
diff --git a/install/tools/ipa-server-install b/install/tools/ipa-server-install
index 479894b36ba94f8f6ff2bec4cd1b3e371fddcbff..a289941e43acb52fc30bbf3750652f0868e92651 100755
--- a/install/tools/ipa-server-install
+++ b/install/tools/ipa-server-install
@@ -132,6 +132,12 @@ def parse_options():
     basic_group.add_option("-a", "--admin-password",
                       sensitive=True, dest="admin_password",
                       help="admin user kerberos password")
+    basic_group.add_option("--mkhomedir",
+                           dest="mkhomedir",
+                           action="store_true",
+                           default=False,
+                           help="create home directories for users "
+                                "on their first login")
     basic_group.add_option("--hostname", dest="host_name", help="fully qualified name of server")
     basic_group.add_option("--ip-address", dest="ip_address",
                       type="ip", ip_local=True,
@@ -1143,6 +1149,8 @@ def main():
             args.append("--no-ssh")
         if not options.conf_sshd:
             args.append("--no-sshd")
+        if options.mkhomedir:
+            args.append("--mkhomedir")
         run(args)
     except Exception, e:
         sys.exit("Configuration of client side components failed!\nipa-client-install returned: " + str(e))
diff --git a/install/tools/man/ipa-replica-install.1 b/install/tools/man/ipa-replica-install.1
index 43d284f576a9c32b3318d7083fbc3d4ee418fd24..b7a55cb748dfd5536d86e1b2634df34fd43f319b 100644
--- a/install/tools/man/ipa-replica-install.1
+++ b/install/tools/man/ipa-replica-install.1
@@ -47,6 +47,9 @@ Directory Manager (existing master) password
 \fB\-w\fR \fIADMIN_PASSWORD\fR, \fB\-\-admin\-password\fR=\fIADMIN_PASSWORD\fR
 Admin user Kerberos password used for connection check
 .TP
+\fB\-\-mkhomedir\fR
+Create home directories for users on their first login
+.TP
 \fB\-N\fR, \fB\-\-no\-ntp\fR
 Do not configure NTP
 .TP
diff --git a/install/tools/man/ipa-server-install.1 b/install/tools/man/ipa-server-install.1
index 75c6a78acc20e93e379ab60d5b0096a65afdd0ac..7460868e328a40f7f07f7ea753f499d9dda1e45f 100644
--- a/install/tools/man/ipa-server-install.1
+++ b/install/tools/man/ipa-server-install.1
@@ -42,6 +42,9 @@ The kerberos master password (normally autogenerated)
 \fB\-a\fR \fIADMIN_PASSWORD\fR, \fB\-\-admin\-password\fR=\fIADMIN_PASSWORD\fR
 The password for the IPA admin user
 .TP
+\fB\-\-mkhomedir\fR
+Create home directories for users on their first login
+.TP
 \fB\-\-hostname\fR=\fIHOST_NAME\fR
 The fully\-qualified DNS name of this server. If the hostname does not match system hostname, the system hostname will be updated accordingly to prevent service failures.
 .TP
-- 
1.8.1.4

_______________________________________________
Freeipa-devel mailing list
Freeipa-devel@redhat.com
https://www.redhat.com/mailman/listinfo/freeipa-devel

Reply via email to