|
Line
Link Here
|
| 0 |
-- dhclient 2006-12-21 22:55:52 -0700 |
0 |
++ dhclient.fixed 2006-12-21 22:54:16 -0700 |
|
Lines 124-132
Link Here
|
| 124 |
if ${edit} && [[ -e ${cffile} && ${d} != *" nosendhost "* ]] ; then |
124 |
if ${edit} && [[ -e ${cffile} && ${d} != *" nosendhost "* ]] ; then |
| 125 |
local hname=$( hostname ) |
125 |
local hname=$( hostname ) |
| 126 |
if [[ ${hname} != "(none)" && ${hname} != "localhost" ]]; then |
126 |
if [[ ${hname} != "(none)" && ${hname} != "localhost" ]]; then |
| 127 |
sed -i '/^[ \t]*send[ \t]*host-name[ \t]*/d' "${cffile}" |
127 |
sed -i "" '/^[ \t]*send[ \t]*host-name[ \t]*/d' "${cffile}" |
| 128 |
if [[ -s ${cffile} ]]; then |
128 |
if [[ -s ${cffile} ]]; then |
| 129 |
sed -i '1 isend host-name "'"${hname}"'";' "${cffile}" |
129 |
sed -i "" '1 isend host-name "'"${hname}"'";' "${cffile}" |
| 130 |
else |
130 |
else |
| 131 |
echo "send host-name \"${hname}\";" > "${cffile}" |
131 |
echo "send host-name \"${hname}\";" > "${cffile}" |
| 132 |
fi |
132 |
fi |