rc-scripts files: ======================================== /sbin/ifup: /sbin/ifdown: These are the only two scripts "in" this directory that should be called directly; these two scripts call all the other scripts as needed. These scripts take one argument normally: the name of the device (e.g. eth0). They are called with a second argument of "boot" during the boot sequence so that devices that are not meant to be brought up on boot (ONBOOT=no, see below) can be ignored at that time. /sbin/network-scripts/network-functions: Not really a public file. Contains functions which the scripts use for bringing interfaces up and down. In particular, it contains most of the code for handling alternative interface configurations and interface change notification through netreport. /lib/rc-scripts/ifup-post Called when any network device EXCEPT a SLIP (with dip) device comes up. Calls /lib/rc-scripts/ifup-routes to bring up static routes that depend on that device. Calls /sbin/network-scripts/ifup-aliases to bring up aliases for that device. Sets the hostname if it is not already set and a hostname can be found for the IP for that device. Sends SIGIO to any programs that have requested notification of network events. Could be extended to fix up nameservice configuration, call arbitrary scripts, etc, as needed. /lib/rc-scripts/ifup-routes Set up static routes for a device. /lib/rc-scripts/ifup-aliases Bring up aliases for a device. /lib/rc-scripts/ifdhcpc-done Called by dhcpcd once dhcp configuration is complete; sets up /etc/resolv.conf from the version dhcpcd dropped in /etc/dhcpc/resolv.conf Files in /etc/sysconfig/interfaces/ ======================================== /etc/sysconfig/interfaces/ifcfg- and /etc/sysconfig/interfaces/ifcfg--: The first defines an interface, and the second contains only the parts of the definition that are different in a "clone" (or alternative) interface. For example, the network numbers might be different, but everything else might be the same, so only the network numbers would be in the clone file, but all the device information would be in the base ifcfg file. The items that can be defined in an ifcfg file depend on the interface type. The really obvious ones I'm not going to bother to define; you can figure out what "IPADDR" is, I think... :-) Base items: DEVICE= LINESPEED= DEFABORT=yes|no (tells netcfg whether or not to put default abort strings in when creating/editing the chat script and/or dip script for this interface) PPP-specific items DEFROUTE=yes|no (set this interface as default route?) ESCAPECHARS=yes|no (simplified interface here doesn't let people specify which characters to escape; almost everyone can use asyncmap 00000000 anyway, and they can set PPPOPTIONS to asyncmap foobar if they want to set options perfectly) HARDFLOWCTL=yes|no (yes imples "modem crtscts" options) PPPOPTIONS= PAPNAME=<"name $PAPNAME" on pppd command line> (note that the "remotename" option is always specified as the logical ppp device name, like "ppp0" (which might perhaps be the physical device ppp1 if some other ppp device was brought up earlier...), which makes it easy to manage pap/chap files -- name/password pairs are associated with the logical ppp device name so that they can be managed together. In principal, I'm not aware of anything that would keep the logical PPP device names from being "worldnet" or "myISP" instead of ppp0-pppN) REMIP= REMIP6= MTU= MRU= DISCONNECTTIMEOUT= (time to wait before re-establishing the connection after a successfully-connected session terminates before attempting to establish a new connection.) RETRYTIMEOUT= (time to wait before re-attempting to establish a connection after a previous attempt fails.) INITSCRIPT= string which initialises your modem. Usualy something like AT&F0&C1&D2 (TLD Linux rc-scripts specific option) DATAFORCHAT= List of variables which should be exported to chat script. Used mostly for passing USERNAME and PASSWORD into it. (see below) (TLD Linux rc-scripts specific option) PEERDNS=yes|no IPV6_PPP=yes|no use IPv6 for ppp IPV6_CP_USEV4=yes|no use local IPv4 mapped addresses as IPv6 addresses IPV6_CP_PERSISTENT=yes|no use EUI-48 addresses as IPv6 addresses or by default use address specified by IP6_PRIM_IF and REMIP6 ENABLE_6TO4=yes|no configure a 6to4 tunnel, if the interface has a public (non-RFC1918) IPv4 address = Variable name and it's value for use by chat script. Note: You don't have to define variables here, if they are defined in parent process enviroment they will be used. in.ex. USERNAME usualy is. IPIP/GRE/SIT tunnel-specific items REMOTEIP= address of the remote end of tunnel LOCALIP= address of the local end of tunnel /etc/sysconfig/interfaces/ifcfg--!: Template or backup file. This will not be interpreted by net-scripts. /etc/sysconfig/interfaces/data/chat-: chat script for PPP or SLIP connection intended to establish the connection. For SLIP devices, a DIP script is written from the chat script; for PPP devices, the chat script is used directly. In TLD Linux version of rc-scripts, this file is parsed by shell (actually by grep in firstplace to get rid of comments) before it is passed to chat. This allows you to substitute shell variables with their values defined in or more generally in current env. If You wonder about purbose, imagine one chat-script for all links at ISP's border router or computer in home where all users have own IPS's accounts and want to pay only for themselfes. Unfortunetly this parsing have impact on chat script syntax. All characters that have special meaning for shell have to be escaped. /etc/sysconfig/interfaces/data/dip- A write-only script created from the chat script by netcfg. Do not modify this. In the future, this file may disappear by default and created on-the-fly from the chat script if it does not exist.