[debian-edu-commits] r82885 - in branches/wheezy/debian-edu-config: debian share/debian-edu-config/tools

pere at alioth.debian.org pere at alioth.debian.org
Fri Jan 3 08:58:05 UTC 2014


Author: pere
Date: 2014-01-03 08:58:05 +0000 (Fri, 03 Jan 2014)
New Revision: 82885

Modified:
   branches/wheezy/debian-edu-config/debian/changelog
   branches/wheezy/debian-edu-config/share/debian-edu-config/tools/ldap-migrate-squeeze-wheezy
Log:
Fix typo in ldap-migrate-squeeze-wheezy and improve error reporting.

Modified: branches/wheezy/debian-edu-config/debian/changelog
===================================================================
--- branches/wheezy/debian-edu-config/debian/changelog	2014-01-03 05:33:48 UTC (rev 82884)
+++ branches/wheezy/debian-edu-config/debian/changelog	2014-01-03 08:58:05 UTC (rev 82885)
@@ -13,6 +13,7 @@
   * Set SUDO_FORCE_REMOVE=yes in debian-edu-bless to allow it to
     automatically replace sudo with sudo-ldap on Raspbian and others
     like it.
+  * Fix typo in ldap-migrate-squeeze-wheezy and improve error reporting.
 
  -- Petter Reinholdtsen <pere at debian.org>  Wed, 18 Sep 2013 14:35:10 +0200
 

Modified: branches/wheezy/debian-edu-config/share/debian-edu-config/tools/ldap-migrate-squeeze-wheezy
===================================================================
--- branches/wheezy/debian-edu-config/share/debian-edu-config/tools/ldap-migrate-squeeze-wheezy	2014-01-03 05:33:48 UTC (rev 82884)
+++ branches/wheezy/debian-edu-config/share/debian-edu-config/tools/ldap-migrate-squeeze-wheezy	2014-01-03 08:58:05 UTC (rev 82885)
@@ -23,7 +23,7 @@
 
   # Get a copy of the current Wheezy LDAP database
   service slapd stop
-  slapcat > wheezy-tjener.dif
+  slapcat > wheezy-tjener.ldif
 
   ldap-migrate-squeeze-wheezy       # Merge the two databases
   slapadd < newtjener-slapadd.ldif  # Load the new/changed entries into LDAP
@@ -54,9 +54,12 @@
 my $newldiffile = "newtjener-slapadd.ldif";
 
 my $oldldif = Net::LDAP::LDIF->new( $oldldiffile, "r", onerror => 'undef' );
+unless ($oldldif) { warn "unable to read $oldldiffile"; usage(1); }
 my $curldif = Net::LDAP::LDIF->new( $curldiffile, "r", onerror => 'undef' );
+unless ($curldif) { warn "unable to read $curldiffile"; usage(1); }
 my $newldif = Net::LDAP::LDIF->new( $newldiffile, "w", onerror => 'undef',
                                     change => 1 );
+unless ($newldif) { warn "unable to write $newldiffile"; usage(1); }
 
 my %curuser;
 my %curgroup;




More information about the debian-edu-commits mailing list