From 2b9089208cbbf16ff5645b17e92f5be289aa1a2f Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Thu, 8 Jan 2009 11:25:24 +0000 Subject: [PATCH] rollback to drupal 4.7 --- PLCWWW.spec | 18 ++++++++---------- drupal-hacks/database.pgsql | 11 +++++++++++ modules/{planetlab => }/planetlab.module | 0 modules/planetlab/planetlab.info | 8 -------- 4 files changed, 19 insertions(+), 18 deletions(-) create mode 100644 drupal-hacks/database.pgsql rename modules/{planetlab => }/planetlab.module (100%) delete mode 100644 modules/planetlab/planetlab.info diff --git a/PLCWWW.spec b/PLCWWW.spec index 450a96d..93c7018 100644 --- a/PLCWWW.spec +++ b/PLCWWW.spec @@ -76,18 +76,16 @@ if [ ! -f settings.php.distrib ] ; then cp settings.php settings.php.distrib sed -e 's|^[ \t]*\$db_url.*|require_once("plc_config.php");$db_url="pgsql://" . PLC_DB_USER . ":" . PLC_DB_PASSWORD . "@" . PLC_DB_HOST . ":" . PLC_DB_PORT . "/drupal";|' \ settings.php.distrib > settings.php -# chown apache:apache settings.php -# chmod 444 settings.php fi popd -#drupal_files_dirs="/var/www/html/files /var/www/html/sites/default/files" -#for dir in $drupal_files_dirs; do -# if [ ! -d $dir ] ; then -# mkdir -p $dir -# chown apache:apache $dir -# fi -#done -# drupal install script cannot be invoked here yet - pgsql might not even be running +# append our own database creation hacks to the drupal database schema +drupal_database_dir=/var/www/html/database +pushd $drupal_database_dir +if [ ! -f database.pgsql.distrib ] ; then + cp database.pgsql database.pgsql.distrib + cat database.pgsql.distrib ../drupal-hacks/database.pgsql > database.pgsql +fi +popd %clean rm -rf $RPM_BUILD_ROOT diff --git a/drupal-hacks/database.pgsql b/drupal-hacks/database.pgsql new file mode 100644 index 0000000..91c8050 --- /dev/null +++ b/drupal-hacks/database.pgsql @@ -0,0 +1,11 @@ +-- PlanetLab changes to the drupal(4.7) database + +-- PlanetLab: Enable path and planetlab modules +INSERT INTO system (filename, name, type, description, status, throttle, bootstrap, schema_version) VALUES ('modules/path.module', 'path', 'module', '', 1, 0, 0, 0); +INSERT INTO system (filename, name, type, description, status, throttle, bootstrap, schema_version) VALUES ('modules/planetlab.module', 'planetlab', 'module', '', 1, 0, 0, 0); + +-- PlanetLab: Create a default superuser +INSERT INTO users(uid,name,mail) VALUES(1,'drupal',''); + +-- PlanetLab: Replace default user login block with PlanetLab login block +update blocks set module='planetlab' where module='user' and delta=0; diff --git a/modules/planetlab/planetlab.module b/modules/planetlab.module similarity index 100% rename from modules/planetlab/planetlab.module rename to modules/planetlab.module diff --git a/modules/planetlab/planetlab.info b/modules/planetlab/planetlab.info deleted file mode 100644 index 8a00d5f..0000000 --- a/modules/planetlab/planetlab.info +++ /dev/null @@ -1,8 +0,0 @@ -; $Id$ -name = "PlanetLab" -description = "Provides a web UI to the PLC API" -package = "PLEWWW" -version = "5.0" -core = 6.x -project = "planetlab" -datestamp = "1231282081" -- 2.43.0