Notice: This area refers to ariane version 1. There's a new update version 2, see http://quietsche-entchen.de/cgi-bin/wiki.cgi/ariane/

Configuration Files

ariane's system layout tries to follow usual linux systems, configuration files are under /etc and nowhere else. But ariane does not have a sysconfig directory tree which is found in normal Linux distribution (perhaps I'll try this in a later release). Instead it uses some non-standard system configuration files for it's setup.

/etc/inittab
/etc/runlevel.conf - Runlevel configuration
/etc/options.conf - Activating services
/etc/module.conf - Loading modules
/etc/network.conf - Network configuration

/etc/inittab

The inittab looks like on other systems too. But it does define a runlevel scheme which is different from most other linux system.

Runlevel Description
S single user mode
0 Halt
1 Drivers from /etc/modules.conf are loaded, /etc/fstab devices are mounted, no network but 6 ttys running.
2 As runlevel 1 with active network and network services. This is the default runlevel.
3 Same as 2, unused.
4 Same as 2 but the only running network service is sshd.
5 In this runlevel you have 6 local ttys and a running syslogd but nothing else, no network no mounts, especially no kernel module is loaded. Use this runlevel for a "soft reset". Runlevel 5 is also ariane's "configure" mode.
6 Reboot

/etc/runlevel.conf - Runlevel configuration

Whenever init changes the system's runlevel it calls /etc/init.d/mrc (which is a symlink of /sbin/c3po) to start and/or stop services. c3po has a manpage, see there for the details. The most important thing about it is that is does not use directories full of symlinks for the start/stop scripts. Instead it reads the runlevel configuration from /etc/runlevel.conf.

/etc/runlevel is a simple UNIX-style text file describing what to do when.

# num	level		start/stop	command
#

03	1-4		-		/etc/init.d/syslogd
05	1-4		-		/etc/init.d/sysctl
06	1-4		-		/etc/init.d/modules
08	1-4		-		/etc/init.d/mount

09	1,2,3		-		/etc/init.d/dma
15	1,2,3		-		/etc/init.d/cron

20	2,3,4		-		/etc/init.d/dhclient
20	2,3,4		-		/etc/init.d/network
22	2,3,4		-		/etc/init.d/route
41	2,3		-		/etc/init.d/inetd
45	2,3,4		-		/etc/init.d/sshd

20	S		-		/etc/init.d/single
50	0		-		/etc/init.d/halt
50	5		-		/etc/init.d/configure
50	6		-		/etc/init.d/reboot

Each non-empty line which is not a comment defines a service. The first field is a number which is used to order the services for a runlevel, followed by the list of runlevels where the service should be active. This field can be an comma separated enumeration or a runlevel range or a mix of both. The third field is usually a dash "-", which means the the command (fourth field) is called with either "start" or "stop" as command line argument. If the start/stop field contains a value the command is only called to start, with the given start/stop parameter.

Read c3po's manpage to see how to add or remove services.

/etc/options.conf - Activating services

The runlevel.conf files tells c3po which scripts to start if runlevels change. If a service should be really started is configured in ariane's options.conf.

The start/stop scripts in /etc/init.d usually read /etc/options.conf to find out if a service should be started or not.

#
# options.conf
#
#  This file defines some system options which do not have another
#  place where they might have been stored.
#

dma			hda
dhcp			eth0

#
# Service switches: start service from /etc/init.d/ or not?
#

dhcpd			no
inetd			no
pxe			no
sshd			no
tftpserver		no


hostname		ariane
domainname		my.domain

And (again usually) the start-stop option is named like the script in init.d, e.g. the option for the dhcpd service is named "dhcpd" but see the init scripts for exact information.

getsysoption and setsysoption can be used to modify options.conf from within a script.

Stopping services
ariane's start-stop script read the /etc/options.conf switches only on start events. If a service should be stopped the scripts terminate running instances regardless of the start option.

/etc/module.conf - Loading modules

ariane does not support the normal modprobe "load on demand" behaviour and there is no /etc/modules.conf. ariane expects that the kernel modules are listed in the file /etc/module.conf

#
# /etc/module.conf
#
#	<type>  <module>  [<parameter>]
#

net	pcnet32

and loads them if runlevel 1 (or higher) is entered. The first field in /etc/module.conf is a group name, the second the modules's name and the optional third module parameters.

The group name can be used to group modules together (e.g. network and SCSI modules). The group name can then be used to load only the modules of that group (e.g. in runlevel 5: "/etc/init.d/modules start net" would only load the network modules).

Since modprobe isn't fully supported (it doesn't know about the module parameter if there are any) modules should be loaded with loadmodules.

/etc/network.conf - Network configuration

The only place where ariane's network is configured is /etc/network.conf.

#
# /etc/network.conf
#
#	The one and only network configuration file.
#

#
# Interface configuration
#
#	<device>  <ipnum>/<netmask>  [<bcast>]	[<bondingpar>]
#
# Simply add your network card device name followed by the IP-number
# and netmask, just as shown above.  <device> may also be a virtual
# device like `eth0:2'.
#

eth0	192.168.1.7/24

#
# Network routes
#
#	route  <ipnum>/<mask>  <gateway>
#

route	0.0.0.0/0.0.0.0	192.168.1.1

This file contains network interface configurations (lines starting with an interface name like eth or bond) and network routes (lines starting with "route").

For an interface configuration there must be simply the card's name (can be a virtual interface) followed by it's IP-number and network mask. Notice that if there is more than one network card their order is controlled by the order of the driver modules in /etc/module.conf.

Network routes are configured by giving the target network by an IP-number from that network and the netmask followed by the gateway router. The gateway may be an interface but interface routes are not automatically removed by "/etc/init.d/route stop" but only when the gateway interface is deconfigured. Furthermore the default route must be specified with "0.0.0.0/0.0.0.0" as target network.

DHCP
In case ariane is configured to use DHCP on an interface (this is configured in /etc/options.conf) the configuration in /etc/network.conf is used as fallback if the DHCP request failed or wasn't served.

Furthermore DHCP will not modify the default gateway. This may be changed in a later ariane release.