diff -Naur BOOK-ORIG/connect/dhcp/bootscripts.xml BOOK-DJL/connect/dhcp/bootscripts.xml
old
|
new
|
|
48 | 48 | echo "Bringing up the eth0 interface..." |
49 | 49 | modprobe eth0 |
50 | 50 | loadproc $DHCP_PROG $DHCP_START |
| 51 | |
| 52 | echo "Setting up the /etc/hosts file..." |
| 53 | |
| 54 | IPADDR=`ifconfig eth0 | \ |
| 55 | grep "inet addr" | cut -f 2 -d ":" | cut -f 1 -d " "` |
| 56 | |
| 57 | sed "s/0.0.0.0/$IPADDR/" \ |
| 58 | /etc/sysconfig/network-devices/hosts.dhcp > /etc/hosts |
| 59 | evaluate_retval |
| 60 | |
51 | 61 | <userinput>EOF</userinput></screen></para> |
52 | 62 | |
53 | 63 | <para>Then the <filename>ifdown-eth0</filename> script:</para> |
… |
… |
|
64 | 74 | evaluate_retval |
65 | 75 | <userinput>EOF</userinput></screen></para> |
66 | 76 | |
67 | | <para>Finally, we need to make these scripts executable:</para> |
| 77 | <para>Next, we need to make these scripts executable:</para> |
68 | 78 | |
69 | 79 | <para><screen><userinput>chmod 755 /etc/sysconfig/network-devices/ifup-eth0 && |
70 | 80 | chmod 755 /etc/sysconfig/network-devices/ifdown-eth0</userinput></screen></para> |
71 | 81 | |
| 82 | <para>Finally, we need to copy your current <userinput>/etc/hosts</userinput> |
| 83 | file to another location, and then edit it so that the script can correct the |
| 84 | IP address in the original file on bootup.</para> |
| 85 | |
| 86 | <para><screen><userinput>cp /etc/hosts /etc/sysconfig/network-devices/hosts.dhcp</userinput></screen></para> |
| 87 | |
| 88 | <para>Now start your favorite editor, and open |
| 89 | <userinput>/etc/sysconfig/network-devices/hosts.dhcp</userinput>. Find |
| 90 | the line that lists the previous static IP address of the FQDN and |
| 91 | change it to the value "<userinput>0.0.0.0</userinput>".</para> |
| 92 | |
72 | 93 | </sect2> |
73 | 94 | |
74 | 95 | </sect1> |