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