Site Search


System Configuration


The next documentation was taken from the CRUX documentation and slighted modified to apply to Kwort

The following runlevels are used in Kwort (defined in /etc/inittab).

1 (S)Single-user Mode
2Multi-user Mode
3-5(Not used)


The initialization scripts used in Kwort follow the BSD-style (as opposed to the SysV-style) and have the following layout.

/etc/rc.d/init/rcSystem boot script
/etc/rc.d/init/rc.singleSingle-user startup script
/etc/rc.d/init/rc.multiMulti-user startup script
/etc/rc.d/init/rc.localLocal multi-user startup script (empty by default)
/etc/rc.d/init/rc.shutdownSystem shutdown script
/etc/rc.confSystem configuration
/etc/rc.dService start/stop script directory

Modify /etc/rc.d/init/rc.local and /etc/rc.conf according to your needs.

Configuration Variables in /etc/rc.conf

The following configuration variables are found in /etc/rc.conf.

FONTSpecifies which console font to load at system startup. The contents of this variable will be passed as argument to setfont(1). The available fonts are located in /usr/share/kbd/consolefonts/.
Example: FONT=default
KEYMAPSpecifies which console keyboard map to load at system startup. The contents of this variable will be passed as argument to loadkeys(1). The available keyboard maps are located in /usr/share/kbd/keymaps/.
Example: KEYMAP=es-latin1
TIMEZONESpecifies the timezone used by the system. The available zone description files are located in /usr/share/zoneinfo/.
Example: TIMEZONE=Europe/Stockholm
HOSTNAMESpecifies the hostname.
Example: HOSTNAME=Aquiles
MODULESYou can indicate the list of modules that will be loaded during startup.
Example: MODULES=(8139too ov511)
LVMIndicate whether you want to use LVM or not (yes/no).
Example: LVM=no
SERVICESSpecifies which services to start at system startup. The services specified in this array must have a matching start/stop script in /etc/rc.d/. When entering multi-user mode the specified scripts will be called in the specified order with the argument start. At system shutdown or when entering single-user mode these scripts will be called in the reverse order with the argument stop.
Example: SERVICES=(sysklogd lo net sshd)

Generating locales

Since Kwort 3 is based on CRUX, glibc does not contain all possible locales anymore, thus you'll have to generate the locales you need/use. The following example is a typical setup for swedish users, replace sv_SE* with the locale you want:

  localedef -i sv_SE -f ISO-8859-1 sv_SE
  localedef -i sv_SE -f ISO-8859-1 sv_SE.ISO-8859-1
  localedef -i sv_SE -f UTF-8 sv_SE.utf8

Network Configuration

The network configuration is found in the service script /etc/rc.d/net. To enable this service you need to add net to the SERVICES array in /etc/rc.conf.

Example to configure the wlo1 device as dhcp:
# /etc/rc.d/net: start/stop network interface

# Connection type: "DHCP" or "static"

# For "static" connections, specify your settings here:
# To see your available devices run "ip link".

# Optional settings:
DHCPOPTS="-h `/bin/hostname` -t 10 -C resolv.conf"

case $1 in
        if [ "${TYPE}" = "DHCP" ]; then
            /sbin/dhcpcd ${DHCPOPTS}
            /sbin/ip addr add ${ADDR}/${MASK} dev ${DEV} broadcast +
            /sbin/ip link set ${DEV} up
            /sbin/ip route add default via ${GW}
        if [ "${TYPE}" = "DHCP" ]; then
            /sbin/dhcpcd -x
            /sbin/ip route del default
            /sbin/ip link set ${DEV} down
            /sbin/ip addr del ${ADDR}/${MASK} dev ${DEV}
        $0 stop
        $0 start
        echo "Usage: $0 [start|stop|restart]"

# End of file