[med-svn] r2499 - trunk/packages/agdbnet/trunk/debian
tille at alioth.debian.org
tille at alioth.debian.org
Tue Sep 16 07:13:21 UTC 2008
Author: tille
Date: 2008-09-16 07:13:20 +0000 (Tue, 16 Sep 2008)
New Revision: 2499
Modified:
trunk/packages/agdbnet/trunk/debian/config
trunk/packages/agdbnet/trunk/debian/postinst
Log:
Enable reconfiguration
Modified: trunk/packages/agdbnet/trunk/debian/config
===================================================================
--- trunk/packages/agdbnet/trunk/debian/config 2008-09-15 22:44:28 UTC (rev 2498)
+++ trunk/packages/agdbnet/trunk/debian/config 2008-09-16 07:13:20 UTC (rev 2499)
@@ -61,7 +61,7 @@
db_go || true
echo "DESCRIPTION = $DESCRIPTION" >> $debuglog
-PATOGEN=`grep '</system>' /etc/${pkg}/${XMLNAME}.xml | sed 's?.*\([^>]\+\)</system>.*?\1?'`
+PATOGEN=`grep '</system>' /etc/${pkg}/${XMLNAME}.xml | sed 's?\([^>]\+\)</system>.*?\1?'`
echo "PATHOGEN = $PATHOGEN" >> $debuglog
# verify whether Pathogen is set in config file
if [ "$PATOGEN" != "##Pathogen##" -a "$PATOGEN" != "" ] ; then
Modified: trunk/packages/agdbnet/trunk/debian/postinst
===================================================================
--- trunk/packages/agdbnet/trunk/debian/postinst 2008-09-15 22:44:28 UTC (rev 2498)
+++ trunk/packages/agdbnet/trunk/debian/postinst 2008-09-16 07:13:20 UTC (rev 2499)
@@ -35,11 +35,18 @@
-e "s/##Pathogen##/${PATHOGEN}/g" \
/usr/share/${pkg}/template/${pkg}.xml > \
"$XMLOUT"
+else
+ cp -a "$XMLOUT" "$XMLOUT".old
+ sed -i \
+ -e "s/longcode=\"[^\"]\+\"/longcode=\"${XMLNAME}\"/g" \
+ -e "s/description=\"[^\"]\+\"/description=\"${DESCRIPTION}\"/g" \
+ -e "s?[^>]\+</system>?${PATHOGEN}</system>?g" \
+ "$XMLOUT"
fi
HTMLOUT=/etc/${pkg}/"$XMLNAME".html
# if no HTML file exists, just create one from the template
-if [ ! -e "$HTMLOUT" ] ; then
+if [ ! -s "$HTMLOUT" ] ; then
sed -e "s/##database##/${XMLNAME}/g" \
-e "s/##Description##/${DESCRIPTION}/g" \
-e "s/##Pathogen##/${PATHOGEN}/g" \
@@ -47,7 +54,7 @@
"$HTMLOUT"
fi
mkdir -p /var/www/${pkg}/"$XMLNAME"
-if [ ! -e /var/www/${pkg}/"$XMLNAME"/index.html ] ; then
+if [ ! -s /var/www/${pkg}/"$XMLNAME"/index.html ] ; then
ln -s "$HTMLOUT" /var/www/${pkg}/"$XMLNAME"/index.html
fi
More information about the debian-med-commit
mailing list