Changeset 622


Ignore:
Timestamp:
02/22/06 00:36:48 (7 years ago)
Author:
anarcat
Message:

[project @ alternc: changeset 2005-04-28 03:34:14 by anarcat]
régler les variables local.sh par défaut même si local.sh existe,
avant de sourcer local.sh. ceci contourne les problèmes d'upgrade de
pre-1.0 -> 0.9.3, où MYSQL_HOST se retrouvait vide car il n'existait
pas dans local.sh dans pre-1.0

Original author: anarcat
Date: 2005-04-28 03:34:14

File:
1 edited

Legend:

Unmodified
Added
Removed
  • debian/config

    r592 r622  
    1818fi 
    1919 
     20# default values for local.sh 
     21MYSQL_HOST=localhost 
     22MYSQL_DATABASE=alternc 
     23MYSQL_USER=sysusr 
     24MYSQL_PASS=`perl -e 'print map{("a".."z","A".."Z",0..9)[int(rand(62))]}(1..10)' ` 
     25DEFAULT_IP=`/sbin/ifconfig | sed -e '/inet add\?r/!d; s/^.*inet add\?r:[^0-9\.]*\([0-9\.]*\).*$/\1/; q'` 
     26DEFAULT_MX=`cat /etc/mailname` 
     27DATA_PART=`df /var/alternc 2>/dev/null | awk '/^\// { print $1 }'` 
     28FQDN=`hostname -f` 
     29# default DATA_PART to /dev/hda, even if we can't find any 
     30# this will occur within vservers 
     31if [ -z $DATA_PART ] 
     32then 
     33    DATA_PART=/dev/hda 
     34fi 
    2035if [ -r /etc/alternc/local.sh ]; then 
    2136  # source the current config 
    2237  . /etc/alternc/local.sh 
    23 else 
    24   # default values for local.sh 
    25   MYSQL_HOST=localhost 
    26   MYSQL_DATABASE=alternc 
    27   MYSQL_USER=sysusr 
    28   MYSQL_PASS=`perl -e 'print map{("a".."z","A".."Z",0..9)[int(rand(62))]}(1..10)' ` 
    29   DEFAULT_IP=`/sbin/ifconfig | sed -e '/inet add\?r/!d; s/^.*inet add\?r:[^0-9\.]*\([0-9\.]*\).*$/\1/; q'` 
    30   DEFAULT_MX=`cat /etc/mailname` 
    31   DATA_PART=`df /var/alternc 2>/dev/null | awk '/^\// { print $1 }'` 
    32   FQDN=`hostname -f` 
    33   # default DATA_PART to /dev/hda, even if we can't find any 
    34   # this will occur within vservers 
    35   if [ -z $DATA_PART ] 
    36       then 
    37       DATA_PART=/dev/hda 
    38       fi 
    3938fi 
    4039 
Note: See TracChangeset for help on using the changeset viewer.