[LON-CAPA-cvs] cvs: doc /loncapafiles verify_domconfiguser.piml
raeburn
raeburn at source.lon-capa.org
Fri Aug 17 18:16:54 EDT 2012
raeburn Fri Aug 17 22:16:54 2012 EDT
Modified files:
/doc/loncapafiles verify_domconfiguser.piml
Log:
- New location for authoring space for domainconfig user in 2.11 and
later.
- Detect if authoring space exists in old location and warn that
/home/httpd/perl/debug/move_construction_spaces.pl needs to be run.
- Create new directory if this is a new installation.
Index: doc/loncapafiles/verify_domconfiguser.piml
diff -u doc/loncapafiles/verify_domconfiguser.piml:1.11 doc/loncapafiles/verify_domconfiguser.piml:1.12
--- doc/loncapafiles/verify_domconfiguser.piml:1.11 Mon Jul 30 01:37:22 2012
+++ doc/loncapafiles/verify_domconfiguser.piml Fri Aug 17 22:16:54 2012
@@ -3,7 +3,7 @@
<!-- verify_domconfiguser.piml -->
<!-- Stuart Raeburn -->
-<!-- $Id: verify_domconfiguser.piml,v 1.11 2012/07/30 01:37:22 raeburn Exp $ -->
+<!-- $Id: verify_domconfiguser.piml,v 1.12 2012/08/17 22:16:54 raeburn Exp $ -->
<!--
@@ -64,6 +64,10 @@
print "Exiting - no lonUsersDir set\n";
exit;
}
+if ($perlvar{'lonDocRoot'} eq '') {
+ print "Exiting - no lonDocRoot set\n";
+ exit;
+}
my %hosts;
my %domains;
my $hostname;
@@ -256,20 +260,34 @@
} else {
print "Verified domain configuration user has author role in domain: $dom.\n";
}
- my $homedir = '/home/'.$confname;
- my $fulldir = $homedir.'/public_html';
- if (!-e $homedir) {
- system("/bin/mkdir $homedir");
- system("/bin/chown -R root:root ".$homedir);
- system("/bin/chmod 0755 $homedir");
- }
- if (!-e $fulldir) {
- system("/bin/mkdir -p $fulldir");
- system("/bin/chmod 02770 $fulldir");
- system("/bin/chown -R www:www $fulldir");
- print "Created /home/$confname/public_html directory for domain configuration user.\n";
- } else {
- print "Verified /home/$confname/public_html directory exists for domain configuration user.\n";
+ my $oldhomedir = '/home/'.$confname;
+ my $oldfulldir = $oldhomedir.'/public_html';
+ my $homedir = $perlvar{'lonDocRoot'}.'/priv/'.$dom;
+ my $fulldir = $homedir.'/'.$confname;
+ if ((!-e $oldhomedir) || (!-e $oldfulldir)) {
+ if (!-e $homedir) {
+ system("/bin/mkdir $homedir");
+ system("/bin/chown -R www:www ".$homedir);
+ system("/bin/chmod 0755 $homedir");
+ }
+ if (!-e $fulldir) {
+ system("/bin/mkdir -p $fulldir");
+ system("/bin/chown -R www:www $fulldir");
+ system("/bin/chmod 0750 $fulldir");
+ print "Created $fulldir directory for domain configuration user.\n";
+ }
+ } elsif ((!-e $homedir) || (!-e $fulldir)) {
+ print "A $oldfulldir directory exists for the domain configuration user\n".
+ "(which is the old location for LON-CAPA 2.10 and earlier), but a \n".
+ "$fulldir directory does not currently exist.\n\n".
+ "This suggests that you are updating an existing LON-CAPA installation\n".
+ "(pre 2.11) with a newer version. At the conclusion of the update you should\n".
+ "(as root) run /home/httpd/perl/debug/move_construction_spaces.pl\n".
+ "which will move authoring spaces (including the domain configuration user's\n".
+ "from /home to $homedir.\n";
+ }
+ if ((-e $homedir) && (-e $fulldir)) {
+ print "Verified $fulldir directory exists for domain configuration user.\n";
}
} else {
print "Domain configuration user does not exist in domain: $dom\n";
More information about the LON-CAPA-cvs
mailing list