more aggressive delete.
Stephen Soltesz [Wed, 1 Jul 2009 00:25:23 +0000 (00:25 +0000)]
fixed bug from wrong IP address in pg_hba.d/rt3.conf
stronger %post setup code for spec file.

plcrt.init
plcrt.spec

index 96aa8f3..eb91888 100644 (file)
@@ -49,7 +49,7 @@ function check_pg_hba ()
        CONF=$PGDATA/pg_hba.conf.d/${NAME}.conf
        if [ ! -f $CONF ] ; then
                echo "host $NAME $USER 127.0.0.1/32 password"   > $CONF
-               echo "host $NAME $USER $PLC_MONITOR_IP/32 password" >> $CONF
+               echo "host $NAME $USER $PLC_RT_IP/32 password" >> $CONF
 
                WROTE_PG_CONFIG="true"
        fi
@@ -238,7 +238,7 @@ case "$1" in
                rm -f /etc/rt3/RT_SiteConfig.pm
                rm -f /etc/rt3/initialdata
                PATTERN="host all postgres 127.0.0.1/32 trust"
-               sed -i -e "s|$PATTERN||g" $PGDATA/pg_hba.conf.d/${RT3_DB_NAME}.conf
+               rm -f $PGDATA/pg_hba.conf.d/${RT3_DB_NAME}.conf
 
                sed -i -e "s/.*mailgate.*//g" /etc/aliases
                rm -f /etc/rt3/setup.finished
index 0308dae..287f581 100644 (file)
@@ -76,6 +76,10 @@ mkdir -p /etc/planetlab/configs
 plc-config --save /etc/planetlab/configs/site.xml \
                --category plc_rt --variable enabled --value true
 
+mkdir -p /var/log/rt3
+touch /var/log/rt3/rt.log
+chown apache.apache /var/log/rt3/rt.log
+
 %changelog
 * Fri Jun 26 2009 Stephen Soltesz <soltesz@cs.princeton.edu> - PLCRT-1.0-1
 - trying to get the tag to work for new package.