[LON-CAPA-cvs] cvs: loncom /build make_domain_coordinator.pl

raeburn raeburn at source.lon-capa.org
Thu Apr 4 11:50:05 EDT 2013


raeburn		Thu Apr  4 15:50:05 2013 EDT

  Modified files:              
    /loncom/build	make_domain_coordinator.pl 
  Log:
  - Support SuSE 12.3.
  
  
Index: loncom/build/make_domain_coordinator.pl
diff -u loncom/build/make_domain_coordinator.pl:1.24 loncom/build/make_domain_coordinator.pl:1.25
--- loncom/build/make_domain_coordinator.pl:1.24	Tue Dec 18 13:05:41 2012
+++ loncom/build/make_domain_coordinator.pl	Thu Apr  4 15:50:05 2013
@@ -11,7 +11,7 @@
 # The LearningOnline Network
 # make_domain_coordinator.pl - Make a domain coordinator on a system
 #
-# $Id: make_domain_coordinator.pl,v 1.24 2012/12/18 13:05:41 raeburn Exp $
+# $Id: make_domain_coordinator.pl,v 1.25 2013/04/04 15:50:05 raeburn Exp $
 #
 # This file is part of the LearningOnline Network with CAPA (LON-CAPA).
 #
@@ -365,10 +365,21 @@
     $distro = <PIPE>;
     close(PIPE);
 }
+
+my $setpasswd = 0;
 if ($distro =~ /^ubuntu|debian/) {
     open(OUT,"|usermod -p `mkpasswd $passwd` $username");
     close(OUT);
-} else {
+    $setpasswd = 1;
+} elsif ($distro =~ /^suse(\d+)\.(\d)$/) {
+    if (($1 > 12) || (($1 == 12) && ($2 > 1))) {
+        open(OUT,"|chpasswd");
+        print(OUT "$username:$passwd\n");
+        close(OUT);
+        $setpasswd = 1;
+    }
+}
+unless ($setpasswd) {
     open(OUT,"|passwd --stdin $username");
     print(OUT $passwd."\n");
     close(OUT);




More information about the LON-CAPA-cvs mailing list