diff --git a/rpms/awips2.upc/Installer.ldm/component.spec b/rpms/awips2.upc/Installer.ldm/component.spec index cb319da605..6e18a423c5 100644 --- a/rpms/awips2.upc/Installer.ldm/component.spec +++ b/rpms/awips2.upc/Installer.ldm/component.spec @@ -137,14 +137,15 @@ if [ $? -ne 0 ]; then fi %pre +DATE=`date -u +%Y%m%d` # Preserve the user etc directory before upgrading if [ -f /awips2/ldm/etc/ldmd.conf ]; then if [ -d /tmp/ldm ]; then rm -rf /tmp/ldm fi mkdir -p /tmp/ldm - cp -rp /awips2/ldm/etc/ldmd.conf /tmp/ldm/ldmd.old - cp -rp /awips2/ldm/etc/pqact.conf /tmp/ldm/pqact.old + cp -rp /awips2/ldm/etc/ldmd.conf /tmp/ldm/ldmd.${DATE} + cp -rp /awips2/ldm/etc/pqact.conf /tmp/ldm/pqact.${DATE} fi %post @@ -289,8 +290,9 @@ else fi # Copy back local ldm -if [ -d /tmp/ldm ]; then - cp -rp /tmp/ldm /awips2/ldm/etc +if [ -d /tmp/ldm/ ]; then + cp -rp /tmp/ldm/pqact.* /awips2/ldm/etc/ + cp -rp /tmp/ldm/ldmd.* /awips2/ldm/etc/ fi %preun