Print this page
5166 sendmail package should be replaceable
Reviewed by: Hans Rosenfeld <hans.rosenfeld@nexenta.com>
Reviewed by: Josef 'Jeff' Sipek <josef.sipek@nexenta.com>
Reviewed by: Toomas Soome <tsoome@me.com>

Split Close
Expand all
Collapse all
          --- old/usr/src/tools/scripts/hgsetup.sh
          +++ new/usr/src/tools/scripts/hgsetup.sh
↓ open down ↓ 114 lines elided ↑ open up ↑
 115  115  done
 116  116  
 117  117  if [[ -n $proxy ]]; then
 118  118          proxyConfig="[http_proxy]
 119  119  host=$proxy
 120  120  "
 121  121  fi
 122  122  
 123  123  if [[ -z $email ]]; then
 124  124          my_id=$(id -un)
 125      -        my_checkhostname=$(check-hostname)
 126      -        my_fqhn=${my_checkhostname##* }
      125 +        my_hostname=$(hostname)
      126 +        possible_fqhns=$(getent hosts $my_hostname | cut -f 2-) 
      127 +        my_fqhn=`for i in $possible_fqhns; do case $i in *.*) echo $i; break;; esac; done` 
 127  128          email="$my_id@$my_fqhn"
 128  129          echo "No e-mail address provided, defaulting to $email"
 129  130  fi
 130  131  
 131  132  if [[ -z "$name" ]]; then
 132  133          name=${name:=$(getent passwd $login | awk -F: '{print $5}')}
 133  134  fi
 134  135  username="$name <$email>"
 135  136  
 136  137  echo "Configured the following:"
↓ open down ↓ 52 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX