version 1.3, 2011/10/27 03:31:50
|
version 1.4, 2011/10/27 03:43:53
|
Line 57 if (ref($perlvar) eq 'HASH') {
|
Line 57 if (ref($perlvar) eq 'HASH') {
|
} |
} |
undef($perlvar); |
undef($perlvar); |
|
|
|
if ($lonuserdir eq '') { |
|
print &mt('Could not determine location of [_1] directory.',"'lonUsersDir'")."\n". |
|
&mt('Stopping')."\n"; |
|
exit; |
|
} |
|
|
|
if ($londocroot eq '') { |
|
print &mt('Could not determine location of [_1] directory.',"'lonDocRoot'")."\n". |
|
&mt('Stopping')."\n"; |
|
exit; |
|
} |
|
|
my $distro; |
my $distro; |
if ($londaemons ne '') { |
if ($londaemons eq '') { |
|
print &mt('Could not determine location of [_1] directory.',"'lonDaemons'")."\n". |
|
&mt('Stopping')."\n"; |
|
exit; |
|
} else { |
if (-e "$londaemons/distprobe") { |
if (-e "$londaemons/distprobe") { |
if (open(PIPE,"perl $londaemons/distprobe|")) { |
if (open(PIPE,"perl $londaemons/distprobe|")) { |
$distro = <PIPE>; |
$distro = <PIPE>; |
close(PIPE); |
close(PIPE); |
} |
} |
} |
} |
} else { |
|
print &mt('Could not determine location of [_1] directory.',"'lonDaemons'")."\n". |
|
&mt('Stopping')."\n"; |
|
exit; |
|
} |
} |
|
|
if ($distro eq '') { |
if ($distro eq '') { |
Line 149 print "\n".&mt("Moving authors' Construc
|
Line 161 print "\n".&mt("Moving authors' Construc
|
"'/home'","'$londocroot/priv/'")."\n\n". |
"'/home'","'$londocroot/priv/'")."\n\n". |
&mt('If there are ambiguities (i.e., the same username belongs to two domains), this will be flagged, and you will be able to decide how to proceed.')."\n"; |
&mt('If there are ambiguities (i.e., the same username belongs to two domains), this will be flagged, and you will be able to decide how to proceed.')."\n"; |
|
|
my $perlvar=&LONCAPA::Configuration::read_conf(); |
|
my ($lonuserdir,$londocroot); |
|
if (ref($perlvar) eq 'HASH') { |
|
$lonuserdir = $perlvar->{'lonUsersDir'}; |
|
$londocroot = $perlvar->{'lonDocRoot'}; |
|
} |
|
undef($perlvar); |
|
|
|
my (undef,undef,$uid,$gid) = getpwnam('www'); |
my (undef,undef,$uid,$gid) = getpwnam('www'); |
my ($action) = ($parameter=~/^(move|undo)$/); |
my ($action) = ($parameter=~/^(move|undo)$/); |
if ($action eq '') { |
if ($action eq '') { |
Line 254 if ($lonuserdir) {
|
Line 258 if ($lonuserdir) {
|
unless (grep(/^\Q$domain\E$/,@machinedoms)) { |
unless (grep(/^\Q$domain\E$/,@machinedoms)) { |
push(@machinedoms,$domain); |
push(@machinedoms,$domain); |
} |
} |
my $dom_target="/home/httpd/html/priv/$domain"; |
my $dom_target="$londocroot/priv/$domain"; |
if ($action eq 'move') { |
if ($action eq 'move') { |
if (!-e $dom_target) { |
if (!-e $dom_target) { |
if (mkdir($dom_target,0755)) { |
if (mkdir($dom_target,0755)) { |