summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDonnie Berkholz <spyderous@gentoo.org>2005-12-04 22:36:23 +0000
committerDonnie Berkholz <spyderous@gentoo.org>2005-12-04 22:36:23 +0000
commita328b7551f6e331975cfada77ce6cafde0428ec9 (patch)
treed6fd7a8bcb0ef0d93230f6a6636b892f79f11944
parentBump for 7.0RC3. (diff)
downloadgentoo-2-a328b7551f6e331975cfada77ce6cafde0428ec9.tar.gz
gentoo-2-a328b7551f6e331975cfada77ce6cafde0428ec9.tar.bz2
gentoo-2-a328b7551f6e331975cfada77ce6cafde0428ec9.zip
Add hook script, to be run when installing to live host.
(Portage version: 2.0.53)
-rw-r--r--sci-chemistry/webmo/ChangeLog5
-rw-r--r--sci-chemistry/webmo/files/reconfig34
2 files changed, 38 insertions, 1 deletions
diff --git a/sci-chemistry/webmo/ChangeLog b/sci-chemistry/webmo/ChangeLog
index 4a1035856692..ea396c15a65f 100644
--- a/sci-chemistry/webmo/ChangeLog
+++ b/sci-chemistry/webmo/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for sci-chemistry/webmo
# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/webmo/ChangeLog,v 1.2 2005/12/04 08:42:14 spyderous Exp $
+# $Header: /var/cvsroot/gentoo-x86/sci-chemistry/webmo/ChangeLog,v 1.3 2005/12/04 22:36:23 spyderous Exp $
+
+ 04 Dec 2005; Donnie Berkholz <spyderous@gentoo.org>; +files/reconfig:
+ Add hook script, to be run when installing to live host.
04 Dec 2005; Donnie Berkholz <spyderous@gentoo.org>;
-files/dont-be-interactive-if-root.patch,
diff --git a/sci-chemistry/webmo/files/reconfig b/sci-chemistry/webmo/files/reconfig
new file mode 100644
index 000000000000..29287760cdb2
--- /dev/null
+++ b/sci-chemistry/webmo/files/reconfig
@@ -0,0 +1,34 @@
+#!/bin/bash
+
+if [ $1 = "install" ]; then
+ FILE="${MY_CGIBINDIR}/webmo/interfaces/globals.int"
+
+ sed -i \
+ -e "s:htmlBase.*:htmlBase=\"${MY_HTDOCSDIR}\":g" \
+ -e "s:cgiBase.*:cgiBase=\"${MY_CGIBINDIR}/webmo\" :g" \
+ -e "s:userBase.*:userBase=\"${MY_HOSTROOTDIR}/webmo\":g" \
+ ${FILE}
+
+ # If a program is enabled, install .int.disabled changes to .int
+ pushd ${MY_CGIBINDIR}/webmo/interfaces
+ for file in ._cfg*; do
+ realfile=${file#._cfg*_}
+ enabled_file=${realfile%.disabled}
+ if [[ -e ${enabled_file} ]]; then
+ enabled_cfgfile=${enabled_file%.disabled}
+ mv ${file} ${enabled_cfgfile}
+ fi
+ done
+ popd
+else
+ echo "done."
+fi
+
+if [ $1 = "clean" ]; then
+ echo "Please examine the contents of the following directories"
+ echo "and delete anything that is no longer necessary"
+ echo
+ echo ${MY_HTDOCSDIR}
+ echo ${MY_CGIBINDIR}/webmo
+ echo ${MY_HOSTROOTDIR}/webmo
+fi