]>
Commit | Line | Data |
---|---|---|
b967329f | 1 | rc-scripts files: |
6e968d25 | 2 | ======================================== |
3 | ||
b967329f | 4 | /sbin/ifup: |
5 | /sbin/ifdown: | |
6e968d25 | 6 | |
6e968d25 | 7 | These are the only two scripts "in" this directory that should |
8 | be called directly; these two scripts call all the other | |
b967329f | 9 | scripts as needed. |
6e968d25 | 10 | |
11 | These scripts take one argument normally: the name of the device | |
12 | (e.g. eth0). They are called with a second argument of "boot" | |
13 | during the boot sequence so that devices that are not meant to | |
14 | be brought up on boot (ONBOOT=no, see below) can be ignored at | |
15 | that time. | |
16 | ||
17 | /sbin/network-scripts/network-functions: | |
18 | ||
19 | Not really a public file. Contains functions which the scripts use | |
20 | for bringing interfaces up and down. In particular, it contains | |
21 | most of the code for handling alternative interface configurations | |
22 | and interface change notification through netreport. | |
23 | ||
f67ce454 | 24 | /lib/rc-scripts/ifup-post |
6e968d25 | 25 | |
de1fc6ce | 26 | Called when any network device EXCEPT a SLIP (with dip) device comes |
f67ce454 | 27 | up. Calls /lib/rc-scripts/ifup-routes to |
6e968d25 | 28 | bring up static routes that depend on that device. Calls |
29 | /sbin/network-scripts/ifup-aliases to bring up | |
30 | aliases for that device. Sets the hostname if it is not | |
31 | already set and a hostname can be found for the IP for that | |
32 | device. Sends SIGIO to any programs that have requested | |
33 | notification of network events. | |
34 | ||
35 | Could be extended to fix up nameservice configuration, call | |
36 | arbitrary scripts, etc, as needed. | |
37 | ||
f67ce454 | 38 | /lib/rc-scripts/ifup-routes |
6e968d25 | 39 | |
40 | Set up static routes for a device. | |
41 | ||
f67ce454 | 42 | /lib/rc-scripts/ifup-aliases |
6e968d25 | 43 | |
44 | Bring up aliases for a device. | |
45 | ||
f67ce454 | 46 | /lib/rc-scripts/ifdhcpc-done |
6e968d25 | 47 | |
48 | Called by dhcpcd once dhcp configuration is complete; sets | |
49 | up /etc/resolv.conf from the version dhcpcd dropped in | |
50 | /etc/dhcpc/resolv.conf | |
51 | ||
52 | Files in /etc/sysconfig/interfaces/ | |
53 | ======================================== | |
54 | ||
b967329f | 55 | /etc/sysconfig/interfaces/ifcfg-<interface-name> and |
56 | /etc/sysconfig/interfaces/ifcfg-<interface-name>-<clone-name>: | |
6e968d25 | 57 | |
58 | The first defines an interface, and the second contains | |
59 | only the parts of the definition that are different in a | |
60 | "clone" (or alternative) interface. For example, the | |
61 | network numbers might be different, but everything else | |
62 | might be the same, so only the network numbers would be | |
63 | in the clone file, but all the device information would | |
64 | be in the base ifcfg file. | |
65 | ||
66 | The items that can be defined in an ifcfg file depend on the | |
67 | interface type. The really obvious ones I'm not going to | |
68 | bother to define; you can figure out what "IPADDR" is, I | |
69 | think... :-) | |
70 | ||
71 | Base items: | |
72 | DEVICE=<name of physical device (except dynamically-allocated PPP | |
73 | devices where it is the "logical name") | |
e8f24cde JR |
74 | IPADDR= IP_AOPTS= IP_ROPTS= IP_LABEL= |
75 | IPADDR1= IP_AOPTS1= IP_ROPTS1= IP_LABEL1= | |
76 | IP_ADDRx= IP_AOPTSx= IP_ROPTSx= IP_LABELx= | |
de1fc6ce | 77 | IP4_PRIM_IF= IP4_SRC_IF= |
e8f24cde | 78 | IP6_PRIM_IF= |
6e968d25 | 79 | GATEWAY= |
80 | ONBOOT=yes|no | |
81 | USERCTL=yes|no | |
f3df266c | 82 | BOOTPROTO=none|bootp|dhcp|pump|zeroconf|auto |
93386514 | 83 | ETHTOOL_OPTS= |
6e968d25 | 84 | |
63e8c567 | 85 | If BOOTPROTO is not "none", then the only other item that |
6e968d25 | 86 | must be set is the DEVICE item; all the rest will be determined |
87 | by the boot protocol. No "dummy" entries need to be created. | |
88 | ||
6e968d25 | 89 | Ethernet-only items: |
90 | {IPXNETNUM,IPXPRIMARY,IPXACTIVE}_{802_2,802_3,ETHERII,SNAP} | |
91 | configuration matrix for IPX. Only used if IPX is active. | |
f67ce454 | 92 | Managed from /lib/rc-scripts/ifup-ipx |
6e968d25 | 93 | |
93386514 ER |
94 | Deprecated, but supported: |
95 | ETHTOOL_OPTS=... | |
96 | Any device-specific options supported by ethtool. For example, | |
97 | if you wanted to force 100Mb full duplex: | |
98 | ETHTOOL_OPTS="speed 100 duplex full autoneg off" | |
99 | Note that changing speed or duplex settings almost always | |
100 | requires disabling autonegotiation with 'autoneg off'. | |
101 | ||
102 | Long term, this should be done by sysadmin-written udev rules. | |
103 | ||
6e968d25 | 104 | PPP/SLIP items: |
105 | PERSIST=yes|no | |
106 | MODEMPORT=<device, say /dev/modem> | |
107 | LINESPEED=<speed, say 115200> | |
108 | DEFABORT=yes|no (tells netcfg whether or not to put default | |
109 | abort strings in when creating/editing the chat script and/or | |
110 | dip script for this interface) | |
111 | ||
112 | PPP-specific items | |
113 | DEFROUTE=yes|no (set this interface as default route?) | |
114 | ESCAPECHARS=yes|no (simplified interface here doesn't let people | |
115 | specify which characters to escape; almost everyone can use | |
116 | asyncmap 00000000 anyway, and they can set PPPOPTIONS to | |
117 | asyncmap foobar if they want to set options perfectly) | |
118 | HARDFLOWCTL=yes|no (yes imples "modem crtscts" options) | |
119 | PPPOPTIONS=<arbitrary option string; is placed last on the | |
120 | command line, so it can override other options like asyncmap | |
121 | that were specified differently> | |
122 | PAPNAME=<"name $PAPNAME" on pppd command line> (note that | |
123 | the "remotename" option is always specified as the logical | |
124 | ppp device name, like "ppp0" (which might perhaps be the | |
125 | physical device ppp1 if some other ppp device was brought | |
126 | up earlier...), which makes it easy to manage pap/chap | |
127 | files -- name/password pairs are associated with the | |
128 | logical ppp device name so that they can be managed | |
129 | together. | |
130 | ||
131 | In principal, I'm not aware of anything that would keep | |
132 | the logical PPP device names from being "worldnet" or | |
133 | "myISP" instead of ppp0-pppN) | |
de1fc6ce JR |
134 | REMIP=<remote ip4 address, normally unspecified> |
135 | REMIP6=<remote ip6 address, normally unspecified> | |
6e968d25 | 136 | MTU= |
137 | MRU= | |
138 | DISCONNECTTIMEOUT=<number of seconds, default currently 5> | |
139 | (time to wait before re-establishing the connection after | |
140 | a successfully-connected session terminates before attempting | |
141 | to establish a new connection.) | |
142 | RETRYTIMEOUT=<number of seconds, default currently 60> | |
143 | (time to wait before re-attempting to establish a connection | |
144 | after a previous attempt fails.) | |
145 | INITSCRIPT=<modem command> | |
146 | string which initialises your modem. Usualy something like | |
147 | AT&F0&C1&D2 | |
ffe19b59 | 148 | (PLD Linux rc-scripts specific option) |
6e968d25 | 149 | DATAFORCHAT=<list of variables> |
150 | List of variables which should be exported to chat script. | |
151 | Used mostly for passing USERNAME and PASSWORD into it. (see below) | |
ffe19b59 | 152 | (PLD Linux rc-scripts specific option) |
de1fc6ce JR |
153 | PEERDNS=yes|no |
154 | IPV6_PPP=yes|no | |
155 | use IPv6 for ppp | |
156 | IPV6_CP_USEV4=yes|no | |
157 | use local IPv4 mapped addresses as IPv6 addresses | |
158 | IPV6_CP_PERSISTENT=yes|no | |
159 | use EUI-48 addresses as IPv6 addresses | |
160 | or by default use address specified by IP6_PRIM_IF and REMIP6 | |
8772739e | 161 | ENABLE_6TO4=yes|no |
162 | configure a 6to4 tunnel, if the interface has a public | |
163 | (non-RFC1918) IPv4 address | |
6e968d25 | 164 | <anything>=<anything> |
165 | Variable name and it's value for use by chat script. | |
166 | Note: You don't have to define variables here, if they are defined | |
167 | in parent process enviroment they will be used. | |
168 | in.ex. USERNAME usualy is. | |
169 | ||
170 | IPIP/GRE/SIT tunnel-specific items | |
171 | REMOTEIP=<ip_addres> | |
172 | address of the remote end of tunnel | |
173 | LOCALIP=<ip_addres> | |
174 | address of the local end of tunnel | |
175 | ||
176 | ||
177 | ||
b967329f | 178 | /etc/sysconfig/interfaces/ifcfg-<interface-name>-<anything>!: |
6e968d25 | 179 | |
180 | Template or backup file. This will not be interpreted | |
181 | by net-scripts. | |
182 | ||
183 | /etc/sysconfig/interfaces/data/chat-<interface-name>: | |
184 | ||
185 | chat script for PPP or SLIP connection intended to establish | |
186 | the connection. For SLIP devices, a DIP script is written | |
187 | from the chat script; for PPP devices, the chat script is used | |
188 | directly. | |
ffe19b59 | 189 | In PLD Linux version of rc-scripts, this file is parsed by shell |
6e968d25 | 190 | (actually by grep in firstplace to get rid of comments) before it |
191 | is passed to chat. | |
192 | This allows you to substitute shell variables with their values | |
193 | defined in <interface name> or more generally in current env. | |
194 | If You wonder about purbose, imagine one chat-script for all links | |
195 | at ISP's border router or computer in home where all users have own IPS's | |
196 | accounts and want to pay only for themselfes. | |
197 | Unfortunetly this parsing have impact on chat script syntax. | |
198 | All characters that have special meaning for shell have to be escaped. | |
199 | ||
200 | ||
201 | /etc/sysconfig/interfaces/data/dip-<interface-name> | |
202 | ||
203 | A write-only script created from the chat script by netcfg. | |
204 | Do not modify this. In the future, this file may disappear | |
205 | by default and created on-the-fly from the chat script if | |
206 | it does not exist. |