]> git.pld-linux.org Git - packages/MigrationTools.git/commitdiff
- rel 8 auto/th/MigrationTools-47-8
authorJan Rękorajski <baggins@pld-linux.org>
Wed, 24 Jun 2009 14:29:18 +0000 (14:29 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- allow passing alternate shadow and smbpasswd to migrate_passwd.pl

Changed files:
    MigrationTools-options.patch -> 1.1
    MigrationTools.spec -> 1.29

MigrationTools-options.patch [new file with mode: 0644]
MigrationTools.spec

diff --git a/MigrationTools-options.patch b/MigrationTools-options.patch
new file mode 100644 (file)
index 0000000..16a5ceb
--- /dev/null
@@ -0,0 +1,57 @@
+diff -ur MigrationTools-47/migrate_passwd.pl x/migrate_passwd.pl
+--- MigrationTools-47/migrate_passwd.pl        2009-06-24 13:47:15.299291875 +0200
++++ x/migrate_passwd.pl        2009-06-24 16:26:58.000000000 +0200
+@@ -46,12 +46,20 @@
+ $NAMINGCONTEXT = &getsuffix($PROGRAM);
+ if ($#ARGV < 0) {
+-      print STDERR "Usage: $PROGRAM [--minuid N] [--maxuid M] infile [outfile]\n";
++      print STDERR "Usage: $PROGRAM [options] infile [outfile]\n";
++      print STDERR "  Options:\n";
++      print STDERR "  --minuid N      Minimal UID number to migrate\n";
++      print STDERR "  --maxuid M      Maximal UIF number to migrate\n";
++      print STDERR "  --samba         Migrate smbpasswd\n";
++      print STDERR "  -s FILE         Path to shadow file (default: /etc/shadow)\n";
++      print STDERR "  -S FILE         Path to smbpasswd file (default: /etc/samba/smbpasswd)\n";
+       exit 1;
+ }
+ $do_samba = 0;
+-while ($ARGV[0] =~ /^--.*/) {
++$shadowf = "/etc/shadow";
++$smbpassf = "/etc/samba/smbpasswd";
++while ($ARGV[0] =~ /^-.*/) {
+       if ($ARGV[0] eq "--minuid") {
+               $minuid = $ARGV[1];
+               shift ; shift;
+@@ -61,6 +69,12 @@
+       } elsif ($ARGV[0] eq "--samba") {
+               $do_samba = 1;
+               shift;
++      } elsif ($ARGV[0] eq "-s") {
++              $shadowf = $ARGV[1];
++              shift ; shift;
++      } elsif ($ARGV[0] eq "-S") {
++              $smbpassf = $ARGV[1];
++              shift ; shift;
+       } else {
+               shift;
+       }
+@@ -208,7 +222,7 @@
+ sub read_shadow_file
+ {
+-      open(SHADOW, "/etc/shadow") || return;
++      open(SHADOW, $shadowf) || return;
+       while(<SHADOW>) {
+               chop;
+               ($shadowUser) = split(/:/, $_);
+@@ -250,7 +264,7 @@
+ sub read_samba
+ {
+-      open(INPUT, "</etc/samba/smbpasswd");
++      open(INPUT, "<$smbpassf");
+       while (<INPUT>) {
+               my ($sambaUser, $id, $lmp, $ntp, $f, $lf, $xxx) = split(':');
+               $sambaUsers{$sambaUser}->{"sambaLMPassword"} = $lmp;
index 88af327d2bd3e4bd336682793c4ece09e284c260..40190f0b7227ea01ff5bbfcf8d5b406485fd4085 100644 (file)
@@ -1,10 +1,10 @@
-# $Revision: 1.28 $Date: 2009-06-24 11:45:53 $
+# $Revision: 1.29 $Date: 2009-06-24 14:29:18 $
 %include        /usr/lib/rpm/macros.perl
 Summary:       LDAP Migration Tools
 Summary(pl.UTF-8):     Narzędzia do migracji do LDAP
 Name:          MigrationTools
 Version:       47
-Release:       7
+Release:       8
 License:       BSD
 Group:         Networking/Admin
 Source0:       http://www.padl.com/download/%{name}-%{version}.tar.gz
@@ -24,6 +24,7 @@ Patch9:               %{name}-noproto.patch
 Patch10:       %{name}-minmax-ugid.patch
 Patch11:       %{name}-utf8.patch
 Patch12:       %{name}-smbkrb5.patch
+Patch13:       %{name}-options.patch
 URL:           http://www.padl.com/OSS/MigrationTools.html
 BuildRequires: rpm-perlprov
 BuildArch:     noarch
@@ -73,6 +74,7 @@ istniejących serwisów nazw (zwykłych plików, NIS, NetInfo) do LDAP.
 %patch10 -p1
 %patch11 -p1
 %patch12 -p1
+%patch13 -p1
 install %{SOURCE1} .
 
 perl -pi -e 's|%%CONFDIR%%|%{_sysconfdir}/openldap/|g;\
This page took 0.049734 seconds and 4 git commands to generate.