2290 storageServer does not install in Ubuntu Hardy

This commit is contained in:
sebastian 2008-08-17 13:04:06 +00:00
parent 810f68605e
commit ff26a05c3e
5 changed files with 46 additions and 25 deletions

View File

@ -181,10 +181,10 @@ dir_setup: ${DOXYGEN_DIR}
bin/setupDirs.sh ${STOR_DIR} ${ACCESS_DIR} ${TRANS_DIR} ${BUFF_DIR}
db_init:
-cd var/install && php -q install.php
cd var/install && php -q install.php
db_clean:
-cd var/install && php -q uninstall.php
cd var/install && php -q uninstall.php
${TMP_DIR}:
${MKDIR} ${TMP_DIR}

View File

@ -216,7 +216,7 @@ endif
init_database:
ifeq (@INIT_LS_DATABASE@,yes)
-cd ${DEST_VAR_DIR}/install && ${PHP} -q install.php
cd ${DEST_VAR_DIR}/install && ${PHP} -q install.php
endif
@ -234,12 +234,12 @@ dir_setup:
bin/setupDirs.sh ${STOR_DIR} ${ACCESS_DIR} ${TRANS_DIR} ${BUFF_DIR}
db_init:
-cd var/install && php -q install.php
cd var/install && php -q install.php
chgrp ${APACHE_GROUP} ${STOR_DIR} ${ACCESS_DIR} ${TRANS_DIR} ${BUFF_DIR}
chmod g+sw ${STOR_DIR} ${ACCESS_DIR} ${TRANS_DIR} ${BUFF_DIR}
db_clean:
-cd var/install && php -q uninstall.php
cd var/install && php -q uninstall.php
reset:
./bin/resetStorage.sh

View File

@ -166,17 +166,22 @@ if (!is_null($this_file)) {
}
}
// make dirpaths better (without "../")
// workaround for missing folders
foreach (array('storageDir', 'bufferDir', 'transDir', 'accessDir', 'pearPath', 'cronDir') as $d) {
$rp = realpath($CC_CONFIG[$d]);
// workaround for missing dirs
// if ( $rp === FALSE ) {
// mkdir( $CC_CONFIG[$d] );
// $rp = realpath($CC_CONFIG[$d]);
// }
if ($rp) {
$CC_CONFIG[$d] = $rp;
$test = file_exists($CC_CONFIG[$d]);
if ( $test === FALSE ) {
@mkdir($CC_CONFIG[$d], 02775);
if (file_exists($CC_CONFIG[$d])) {
$rp = realpath($CC_CONFIG[$d]);
//echo " * Directory $rp created\n";
} else {
echo " * Failed creating {$CC_CONFIG[$d]}\n";
exit(1);
}
} else {
$rp = realpath($CC_CONFIG[$d]);
}
$CC_CONFIG[$d] = $rp;
}
?>

View File

@ -142,12 +142,19 @@ $CC_CONFIG['sysSubjs'] = array(
$old_ip = get_include_path();
set_include_path('.'.PATH_SEPARATOR.$CC_CONFIG['pearPath'].PATH_SEPARATOR.$old_ip);
// make dirpaths better (without ../)
// workaround for missing folders
foreach (array('storageDir', 'bufferDir', 'transDir', 'accessDir', 'pearPath', 'cronDir') as $d) {
$rp = realpath($CC_CONFIG[$d]);
// workaround for missing dirs
if ( $rp === FALSE ) {
mkdir( $CC_CONFIG[$d] );
$test = file_exists($CC_CONFIG[$d]);
if ( $test === FALSE ) {
@mkdir($CC_CONFIG[$d], 02775);
if (file_exists($CC_CONFIG[$d])) {
$rp = realpath($CC_CONFIG[$d]);
//echo " * Directory $rp created\n";
} else {
echo " * Failed creating {$CC_CONFIG[$d]}\n";
exit(1);
}
} else {
$rp = realpath($CC_CONFIG[$d]);
}
$CC_CONFIG[$d] = $rp;

View File

@ -45,14 +45,23 @@ if (!camp_db_table_exists($CC_CONFIG['prefTable'])) {
// Install storage directories
//------------------------------------------------------------------------
foreach (array('storageDir', 'bufferDir', 'transDir', 'accessDir', 'pearPath', 'cronDir') as $d) {
$rp = file_exists($CC_CONFIG[$d]);
if ( $rp === FALSE ) {
echo " * Creating directory ".$CC_CONFIG[$d]."...";
mkdir($CC_CONFIG[$d], 02775);
echo "done.\n";
$test = file_exists($CC_CONFIG[$d]);
if ( $test === FALSE ) {
@mkdir($CC_CONFIG[$d], 02775);
if (file_exists($CC_CONFIG[$d])) {
$rp = realpath($CC_CONFIG[$d]);
echo " * Directory $rp created\n";
} else {
echo " * Failed creating {$CC_CONFIG[$d]}\n";
exit(1);
}
} elseif (is_writable($CC_CONFIG[$d])) {
$rp = realpath($CC_CONFIG[$d]);
echo " * Skipping directory already exists: $rp\n";
} else {
echo " * Skipping: directory already exists: $rp\n";
$rp = realpath($CC_CONFIG[$d]);
echo " * ERROR. Directory already exists, but is not writable: $rp\n";
exit(1);
}
$CC_CONFIG[$d] = $rp;
}