[LON-CAPA-cvs] cvs: doc /install/suse/sles10 install.pl
raeburn
lon-capa-cvs@mail.lon-capa.org
Tue, 10 Oct 2006 01:16:33 -0000
raeburn Mon Oct 9 21:16:33 2006 EDT
Modified files:
/doc/install/suse/sles10 install.pl
Log:
custom mod_perl.conf no longer needed (/etc/sysconfig/apache2 no longer loads files from conf.d). setup_www() modified to add group www and user www.
Index: doc/install/suse/sles10/install.pl
diff -u doc/install/suse/sles10/install.pl:1.1 doc/install/suse/sles10/install.pl:1.2
--- doc/install/suse/sles10/install.pl:1.1 Tue Sep 19 16:59:31 2006
+++ doc/install/suse/sles10/install.pl Mon Oct 9 21:16:33 2006
@@ -33,7 +33,7 @@
# note: The filehandle LOG is global.
open LOG,">>loncapa_install.log" || die "Unable to open log file.\n";
-print LOG '$Id: install.pl,v 1.1 2006/09/19 20:59:31 raeburn Exp $'."\n";
+print LOG '$Id: install.pl,v 1.2 2006/10/10 01:16:33 raeburn Exp $'."\n";
# Some friendly subroutines
sub die_if_nonempty {
@@ -205,15 +205,29 @@
## Set up www
##
print_and_log("Creating user 'www'\n");
- $result = `/usr/sbin/useradd www`;
- if (! (($result eq '') || ($result =~ /user www exists/))) {
- die "Unable to add user www. Halting.\n";
+ # -- Add group
+ my $status = `/usr/sbin/groupadd www`;
+ if (! (($status eq '') || ($status =~ /Group `www' already exists\./))) {
+ die "Unable to add group www. Halting.\n";
+ }
+ my $gid = getgrnam('www');
+
+ if (open (PIPE, "/usr/sbin/useradd -c LONCAPA -g $gid www 2>&1 |")) {
+ $status = <PIPE>;
+ close(PIPE);
+ chomp($status);
+ if (! (($status eq '') || ($status =~ /Account `www' already exists\./))){
+ die "Unable to add user www. Halting.\n";
+ }
+ } else {
+ die "Unable to run command to add user www. Halting.\n";
}
+
if (!-e '/home/www') {
mkdir('/home/www',0755);
system('chmod www:www /home/www');
}
- writelog ($result);
+ writelog ($status);
}
###############################################
@@ -355,7 +369,7 @@
###############################################
##
## Copy apache2 config files: default-server.conf,
-## uid.conf, conf.d/mod_perl.conf, /etc/sysconfig/apache2
+## uid.conf, /etc/sysconfig/apache2
## and create symlink from /srv/www/conf to /etc/apache2
##
###############################################
@@ -380,7 +394,7 @@
###############################################
##
-## Modify uid.conf, conf.d/mod_perl.conf
+## Modify uid.conf
##
###############################################
sub copy_apache2_conf_files {
@@ -390,12 +404,6 @@
}
copy "$instdir/uid.conf","/etc/apache2/uid.conf";
chmod 0444,"/etc/apache2/uid.conf";
- print_and_log("Copying our mod_perl.conf to /etc/apache2/conf.d/mod_perl.conf\n");
- if (!-e "/etc/apache2/mod_perl.conf.original") {
- copy "/etc/apache2/conf.d/mod_perl.conf","/etc/apache2/mod_perl.conf.original";
- }
- copy "$instdir/mod_perl.conf","/etc/apache2/conf.d/mod_perl.conf";
- chmod 0444,"/etc/apache2/conf.d/mod_perl.conf";
}
###############################################