Ignore:
Timestamp:
05/22/13 12:44:21 (10 years ago)
Author:
ramonb
Message:

debian/control:

  • depend on Ganglia 3.3.8

debian/*.postinst:

  • (de)configure is actually called on upgrade
  • changed upgrade logic to check if $2 is empty

debian/jobmonarch-webfrontend.prerm:

  • only print warning upon removal

debian/jobmonarch-jobmond.prerm, debian/jobmonarch-jobarchived.prerm:

  • only disable runlevel symlinks on removal
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/1.0/debian/jobmonarch.postinst

    r871 r896  
    55set -e
    66
    7 case "$1" in
    8     configure)
    9         # Only on install (not during upgrade)
    10         echo "Generating random password and updating apropriate files"
    11         # Generate a 8 char password for the database:
    12         export DB_PASSWD=$(tr -dc A-Za-z0-9_< /dev/urandom |head -c 8 | xargs)
    13         # Set the password in the SQL script
    14         sed -i -e '/^.*modify me:.*$/d' -e 's/^-- CREATE/CREATE/g' -e "s/'';/'$DB_PASSWD';/g" %{_datadir}/jobarchived/job_dbase.sql
    15         # Set the password in the jobarchived config.
    16         sed -i -e "s/^#JOB_SQL_PASSWORD.*$/JOB_SQL_PASSWORD\t\t: $DB_PASSWD/g" %{_sysconfdir}/jobarchived.conf
    17         # Set the password in the ganglia conf.php
    18         sed -i -e "s|^//\$JOB_ARCHIVE_SQL_PASSWORD.*|\$JOB_ARCHIVE_SQL_PASSWORD = \"$DB_PASSWD\"|g" %{gangliaaddonsdir}/job_monarch/conf.php
    19         ;;
    20     *)
    21         ;;
    22 esac
     7if [ -z "$2" ]
     8then
     9    # Only on install (not during upgrade)
     10    echo "Generating random password and updating apropriate files"
     11    # Generate a 8 char password for the database:
     12    export DB_PASSWD=$(tr -dc A-Za-z0-9_< /dev/urandom |head -c 8 | xargs)
     13    # Set the password in the SQL script
     14    sed -i -e '/^.*modify me:.*$/d' -e 's/^-- CREATE/CREATE/g' -e "s/'';/'$DB_PASSWD';/g" %{_datadir}/jobarchived/job_dbase.sql
     15    # Set the password in the jobarchived config.
     16    sed -i -e "s/^#JOB_SQL_PASSWORD.*$/JOB_SQL_PASSWORD\t\t: $DB_PASSWD/g" %{_sysconfdir}/jobarchived.conf
     17    # Set the password in the ganglia conf.php
     18    sed -i -e "s|^//\$JOB_ARCHIVE_SQL_PASSWORD.*|\$JOB_ARCHIVE_SQL_PASSWORD = \"$DB_PASSWD\"|g" %{gangliaaddonsdir}/job_monarch/conf.php
     19else
     20    # this is a upgrade
     21    :
     22fi
    2323
    2424exit 0
Note: See TracChangeset for help on using the changeset viewer.