Navigation


Changeset 505:c3f1ba2c12d3 in freeDiameter


Ignore:
Timestamp:
Aug 19, 2010, 7:43:30 PM (14 years ago)
Author:
Sebastien Decugis <sdecugis@nict.go.jp>
Branch:
default
Phase:
public
Message:

Fix the new buggy postinst script

File:
1 edited

Legend:

Unmodified
Added
Removed
  • contrib/OpenWRT/packages/freeDiameter/Makefile

    r504 r505  
    123123
    124124# Test if the configuration file contains the local identity already
    125 localid = `sed -n -r -e "s/^[[:space:]]*Identity[[:space:]]*=[[:space:]]*\"([^\"]*)\"[[:space:]]*;/\1/p" /etc/freeDiameter/freeDiameter.conf`
     125localid=`sed -n -r -e "s/^[[:space:]]*Identity[[:space:]]*=[[:space:]]*\"([^\"]*)\"[[:space:]]*;/\1/p" /etc/freeDiameter/freeDiameter.conf`
    126126if [ -z "$localid" ]; then
    127127   # Ask for the local name
     
    136136# Is there already a ConnectPeer directive?
    137137grep -q -E -e "^[[:space:]]*ConnectPeer[[:space:]]*=" /etc/freeDiameter/freeDiameter.conf
    138 if [ "$?" -eq "1"; then
     138if [ "$?" -eq "1" ]; then
    139139   echo -n "Diameter Identity of your Diameter server: "
    140140   read serverid
     
    145145      read serverip
    146146      connstr=""
    147       if [ -n "$serverip"] then
     147      if [ -n "$serverip"]; then
    148148        connstr=" { ConnectTo = \"$serverip\"; }"
    149149      fi
     
    168168   echo "country = net"                         >>/tmp/template.cnf
    169169   echo "cn = $localid"                         >>/tmp/template.cnf
    170    echo "expiration_days = 3650                 >>/tmp/template.cnf
    171    echo "signing_key                            >>/tmp/template.cnf
    172    echo "encryption_key                         >>/tmp/template.cnf
     170   echo "expiration_days = 3650"                >>/tmp/template.cnf
     171   echo "signing_key"                           >>/tmp/template.cnf
     172   echo "encryption_key"                        >>/tmp/template.cnf
    173173   certtool -s --load-privkey /etc/freeDiameter/freeDiameter.key \
    174174               --outfile /etc/freeDiameter/freeDiameter.pem \
     
    176176   rm -f /tmp/template.cnf
    177177   echo "Done."
     178   echo "============================================================"
    178179   echo "To enable TLS communication, you should either:"
    179180   echo "  - use a real certificate signed by your server's CA"
    180181   echo "  - or, copy the two peers certificates in a ca.pem file and "
    181182   echo "    add this file in freeDiameter configuration."
     183   echo "============================================================"
    182184fi
    183185endef
Note: See TracChangeset for help on using the changeset viewer.