Changeset b822811 for chapter07/ethnet.xml
- Timestamp:
- 07/22/2001 07:45:10 PM (23 years ago)
- Branches:
- 10.0, 10.0-rc1, 10.1, 10.1-rc1, 11.0, 11.0-rc1, 11.0-rc2, 11.0-rc3, 11.1, 11.1-rc1, 11.2, 11.2-rc1, 11.3, 11.3-rc1, 12.0, 12.0-rc1, 12.1, 12.1-rc1, 12.2, 12.2-rc1, 6.0, 6.1, 6.1.1, 6.3, 6.4, 6.5, 6.6, 6.7, 6.8, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5, 7.5-systemd, 7.6, 7.6-systemd, 7.7, 7.7-systemd, 7.8, 7.8-systemd, 7.9, 7.9-systemd, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, arm, bdubbs/gcc13, ml-11.0, multilib, renodr/libudev-from-systemd, s6-init, trunk, v3_0, v3_1, v3_2, v3_3, v4_0, v4_1, v5_0, v5_1, v5_1_1, xry111/arm64, xry111/arm64-12.0, xry111/clfs-ng, xry111/lfs-next, xry111/loongarch, xry111/loongarch-12.0, xry111/loongarch-12.1, xry111/loongarch-12.2, xry111/mips64el, xry111/multilib, xry111/pip3, xry111/rust-wip-20221008, xry111/update-glibc
- Children:
- f1da843
- Parents:
- 46f5461
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
chapter07/ethnet.xml
r46f5461 rb822811 2 2 <title>Creating the /etc/init.d/ethnet script</title> 3 3 4 <para> 5 This section only applies if a user is going to configure a network card. 6 If not, this section can be skipped. 7 </para> 4 <para>This section only applies if a user is going to configure a network card. 5 If not, this section can be skipped.</para> 8 6 9 <para> 10 Create the <filename>/etc/init.d/ethnet</filename> script by running the 11 following command: 12 </para> 7 <para>Create the <filename>/etc/init.d/ethnet</filename> script by running the 8 following command:</para> 13 9 14 <para> 15 <screen> 16 <userinput>cat > /etc/init.d/ethnet << "EOF"</userinput> 10 <para><screen><userinput>cat > /etc/init.d/ethnet << "EOF"</userinput> 17 11 #!/bin/sh 18 12 # Begin /etc/init.d/ethnet … … 115 109 116 110 # End /etc/init.d/ethnet 117 <userinput>EOF</userinput> 118 </screen> 119 </para> 111 <userinput>EOF</userinput></screen></para> 120 112 121 113 <sect2> 122 114 <title>Adding default gateway to /etc/sysconfig/network</title> 123 115 124 <para> 125 If a default gateway is required to be setup, the following command does that: 126 </para> 116 <para>If a default gateway is required to be setup, the 117 following command does that:</para> 127 118 128 <para> 129 <screen> 130 <userinput>cat >> /etc/sysconfig/network << "EOF"</userinput> 119 <para><screen><userinput>cat >> /etc/sysconfig/network << "EOF"</userinput> 131 120 GATEWAY=192.168.1.2 132 121 GATEWAY_IF=eth0 133 <userinput>EOF</userinput> 134 </screen> 135 </para> 122 <userinput>EOF</userinput></screen></para> 136 123 137 <para> 138 GATEWAY and GATEWAY_IF need to be changed to match the network setup. 124 <para>GATEWAY and GATEWAY_IF need to be changed to match the network setup. 139 125 GATEWAY contains the address of the default gateway, and GATEWAY_IF 140 126 contains the network interface through which that default gateway can 141 be reached. 142 </para> 127 be reached.</para> 143 128 144 129 </sect2> … … 147 132 <title>Creating NIC configuration files</title> 148 133 149 <para> 150 Which interfaces are brought up and down by the ethnet script depends on 134 <para>Which interfaces are brought up and down by the ethnet script depends on 151 135 the files in the /etc/sysconfig/nic-config directory. This 152 136 directory should contain files in the form of ifcfg-x where x is an 153 identification number (or whatever a user named it). 154 </para> 137 identification number (or whatever a user named it).</para> 155 138 156 <para> 157 First the nic-config directory is created by running: 158 </para> 139 <para>First the nic-config directory is created by running:</para> 159 140 160 <para> 161 <screen> 162 <userinput>mkdir /etc/sysconfig/nic-config</userinput> 163 </screen> 164 </para> 141 <para><screen><userinput>mkdir 142 /etc/sysconfig/nic-config</userinput></screen></para> 165 143 166 <para> 144 <para>Now, new files are created in that directory containing the following. 145 The following command creates a sample file ifcfg-eth0:</para> 167 146 168 Now, new files are created in that directory containing the following. 169 The following command creates a sample file ifcfg-eth0: 170 </para> 171 172 <para> 173 <screen> 174 <userinput>cat > /etc/sysconfig/nic-config/ifcfg-eth0 << "EOF"</userinput> 147 <para><screen><userinput>cat > /etc/sysconfig/nic-config/ifcfg-eth0 << "EOF"</userinput> 175 148 ONBOOT=yes 176 149 DEVICE=eth0 … … 178 151 NETMASK=255.255.255.0 179 152 BROADCAST=192.168.1.255 180 <userinput>EOF</userinput> 181 </screen> 182 </para> 153 <userinput>EOF</userinput></screen></para> 183 154 184 <para> 185 Of course, the values of those four variables have to be changed 155 <para>Of course, the values of those four variables have to be changed 186 156 in every file to 187 157 match the proper setup. Usually NETMASK and BROADCAST will remain the … … 189 159 the ONBOOT variable is set to yes, the ethnet script will bring it up 190 160 during boot up of the system. If set to anything else but yes it will be 191 ignored by the ethnet script and thus not brought up. 192 </para> 161 ignored by the ethnet script and thus not brought up.</para> 193 162 194 163 </sect2>
Note:
See TracChangeset
for help on using the changeset viewer.