|
Personal tools |
|
|
/Documentation/sysconfig
From AnnvixSystem Configuration with /etc/sysconfig Like Mandriva Linux and many other Linux distributions, the /etc directory is home to many configuration files. Of particular interest is the /etc/sysconfig directory. This directory contains a number of miscellaneous files that are sourced by various run and init scripts. Unlike Mandriva Linux, most of the configuration files here have been converted to Environment Directories. The few that remain are documented below. Examining and possibly modifying some of these files can be to your advantage. Here we look at the various configuration files to determine what their use is and how to configure them. To edit any of these files, use vim or any other text editor you may have installed: # cd /etc/sysconfig # vim installkernel
Sysconfig FileshwconfThis file is created by kudzu and lists all of the devices installed on the system, including moule information (the driver keyword), a description, vendor idenfication information, etc. This file is not meant to be user-modified. i18nThis file sets the locale information on the system. Since Annvix only uses the english locale as of 2.0-RELEASE, this file should not be altered (i.e. changing the LANG option to something other than "en_US" probably will not accomplish what you want since all non-english locale files are removed at build). installkernelThis file controls some aspects of how the installkernel helper script works. The defaults are sufficient for most and the file is heavily commented to show what each option does. Network Configuration FilesThe configuration files that manage network configuration for specific devices (such as eth0) are located in /etc/sysconfig/network-scripts. Each device and IP alias has it's own configuration file, such as ifcfg-eth0 for configuration of eth0, and ifcfg-eth0:0 for the first IP alias of eth0 (or eth0:0). Dynamic IP ConfigurationDynamic IP-assigned devices are those that use protocols like DHCP. An example ifcfg-eth0 file for a dynamically-assigned IP on eth0 would be: DEVICE=eth0 BOOTPROTO=dhcp ONBOOT=yes MII_NOT_SUPPORTED=yes This indicates that the device is eth0, the boot protocol is DHCP, that the interface is to start at boot, and does not try to use ifstatus to see if the network link is up. Static IP ConfigurationA static IP-assigned device is one that will retain it's IP address constantly. With a static IP, unlike a dynamic one, you need to provide more information, such as the netmask, broadcast address, etc. An example ifcfg-eth1 file for a statically-assigned IP on eth1 would be: DEVICE=eth1 BOOTPROTO=static IPADDR=10.0.10.100 NETMASK=255.0.0.0 NETWORK=10.0.0.0 BROADCAST=10.255.255.255 ONBOOT=yes MII_NOT_SUPPORTED=yes This indicates that the device is eth1, the boot protocol is static, the IP address is 10.0.10.100, the netmask is 255.0.0.0, the network address is 10.0.0.0, the broadcast address is 10.255.255.255, the device is to start at boot, and does not try to use ifstatus to see if the network link is up. IP AliasesIP aliases piggy-back a lot of information from the "parent" device. For instance, if you wished to have eth1:0 assigned a static IP address of 10.0.10.101 with ifcfg-eth1 configured as above, the ifcfg-eth1:0 file would contain: DEVICE=eth1:0 IPADDR=10.0.10.101 No other information is required as it will be taken from the "parent" device (in this case, eth1). If, on the other hand, you wished to have eth0:1 have a static IP address, and eth0 is dynamic (as shown above), you would need to indicate the appropriate information. If the netmask, network address, etc. settings are the same they can be omitted, however you will need to indicate that eth0:1 is static, as opposed to eth0 (which is dynamic). This can be done thus: DEVICE=eth0:1 BOOTPROTO=static IPADDR=192.168.4.100 This would statically-assign the IP address 192.168.4.100 to eth0:1, while eth0 itself remains dynamic. Also keep in mind that network configuration also uses some envdir settings from /etc/sysconfig/env/network/ that will need to be aware of, such as setting the default gateway address, gateway device, hostname, and whether or not networking is to be enabled automatically. Network Options for ifcfg FilesThe following keyword options are available for use in ifcfg-ethX files:
The following keyword options are only valid for IP aliases:
Environment DirectoriesRefer to System Configuration with Environment Files and Directories for the preferred method of configuration with single-file configuration files as opposed to the sysconfig method of configuration. This are discussed in network Environment Directories. |
![]() |
|
|
| |||