/[baselayout]/branches/baselayout-1_12/net-scripts/net.modules.d/dhclient
Gentoo

Diff of /branches/baselayout-1_12/net-scripts/net.modules.d/dhclient

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1354 Revision 1355
147 [[ ${d} == " " ]] && d=" ${dhcp} " 147 [[ ${d} == " " ]] && d=" ${dhcp} "
148 148
149 # Send our hostname by editing cffile 149 # Send our hostname by editing cffile
150 if ${edit} && [[ -e ${cffile} && ${d} != *" nosendhost "* ]] ; then 150 if ${edit} && [[ -e ${cffile} && ${d} != *" nosendhost "* ]] ; then
151 local hostname=$( hostname ) 151 local hostname=$( hostname )
152 hostname="fu2"
153 if [[ ${hostname} != "(none)" && ${hostname} != "localhost" ]]; then 152 if [[ ${hostname} != "(none)" && ${hostname} != "localhost" ]]; then
154 sed -i '/^[ \t]*send[ \t]*host-name[ \t]*/d' "${cffile}" 153 sed -i '/^[ \t]*send[ \t]*host-name[ \t]*/d' "${cffile}"
155 if [[ -s ${cffile} ]]; then 154 if [[ -s ${cffile} ]]; then
156 sed -i '1 isend host-name "'"${hostname}"'"' "${cffile}" 155 sed -i '1 isend host-name "'"${hostname}"'";' "${cffile}"
157 else 156 else
158 echo "send host-name \"${hostname}\";" > "${cffile}" 157 echo "send host-name \"${hostname}\";" > "${cffile}"
159 fi 158 fi
160 fi 159 fi
161 fi 160 fi

Legend:
Removed from v.1354  
changed lines
  Added in v.1355

  ViewVC Help
Powered by ViewVC 1.1.20