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>


 105                 cdm_path="$dir/$cdmbin"
 106         fi
 107 
 108         if [[ -f "$dir/$stylefile" && -z "$style_path" ]]; then
 109                 style_path="$dir/$stylefile"
 110         fi
 111 
 112         if [[ -n "$cdm_path" && -n "$style_path" ]]; then
 113                 break
 114         fi
 115 done
 116 
 117 if [[ -n $proxy ]]; then
 118         proxyConfig="[http_proxy]
 119 host=$proxy
 120 "
 121 fi
 122 
 123 if [[ -z $email ]]; then
 124         my_id=$(id -un)
 125         my_checkhostname=$(check-hostname)
 126         my_fqhn=${my_checkhostname##* }

 127         email="$my_id@$my_fqhn"
 128         echo "No e-mail address provided, defaulting to $email"
 129 fi
 130 
 131 if [[ -z "$name" ]]; then
 132         name=${name:=$(getent passwd $login | awk -F: '{print $5}')}
 133 fi
 134 username="$name <$email>"
 135 
 136 echo "Configured the following:"
 137 if [[ -n $proxy ]]; then
 138         echo "  proxy: $proxy"
 139 fi
 140 echo "  email: $email"
 141 echo "  username: $name"
 142 echo "  style: $style_path"
 143 echo "  cadmium: $cdm_path"
 144 
 145 if [[ -z "$cdm_path" ]]; then
 146         echo "Warning: you will need to edit your .hgrc file\n" \




 105                 cdm_path="$dir/$cdmbin"
 106         fi
 107 
 108         if [[ -f "$dir/$stylefile" && -z "$style_path" ]]; then
 109                 style_path="$dir/$stylefile"
 110         fi
 111 
 112         if [[ -n "$cdm_path" && -n "$style_path" ]]; then
 113                 break
 114         fi
 115 done
 116 
 117 if [[ -n $proxy ]]; then
 118         proxyConfig="[http_proxy]
 119 host=$proxy
 120 "
 121 fi
 122 
 123 if [[ -z $email ]]; then
 124         my_id=$(id -un)
 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` 
 128         email="$my_id@$my_fqhn"
 129         echo "No e-mail address provided, defaulting to $email"
 130 fi
 131 
 132 if [[ -z "$name" ]]; then
 133         name=${name:=$(getent passwd $login | awk -F: '{print $5}')}
 134 fi
 135 username="$name <$email>"
 136 
 137 echo "Configured the following:"
 138 if [[ -n $proxy ]]; then
 139         echo "  proxy: $proxy"
 140 fi
 141 echo "  email: $email"
 142 echo "  username: $name"
 143 echo "  style: $style_path"
 144 echo "  cadmium: $cdm_path"
 145 
 146 if [[ -z "$cdm_path" ]]; then
 147         echo "Warning: you will need to edit your .hgrc file\n" \