We took some screenshots to show key and value examples and their disposition in the key tree. Elektra per se can't produce screenshots because it is only a library and some standards. Most of these screenshots where taken from kdbedit - the Elektra GUI admin tool.
Contents |
It is very handy for the system's signature to be a set of keys. This way any application can be aware were it is being installed and take decisions acordingly. This is how a Red Hat system signature should be:
Here again some special keys are not accessible for this regular user. In this case, the SSH host identities. This example also shows that related configuration information that today stays in different files and directories, in this case the hostname, host identity keys and version of OS, when migrated to Elektra can stay together under a single system/signature.
The Elektra keys of the combined /etc/passwd and /etc/shadow entry for user 'apache' would look like:
As you can see, keys like system/users/apache/shadowPassword are unaccessible to the regular users that was browsing the keys with kdbedit, while keys like system/users/apache/gecos are perfectly readable.
The entry in /etc/inittab that is responsible for starting X11 would look:
The users database files and /etc/inittab were Elektrified to key-value pairs using the users-convert and inittab-convert scripts included with the distribution.
This tree was generated by the convert-hwconfKudzu program that converts the /etc/sysconfig/hwconf file into Elektra's keys. In this example, we see that it detected a connected mouse. The keys under system/hw/byClass/MOUSE/GenericMousePS2psaux have all hardware properties detected by kudzu. There is also a system/hw/byBus tree that contains symbolic links to the byClass tree, to facilitate key access.
fstab-convert created this system/filesystems tree showed here, based on /etc/fstab. A unique identifier was calculated for each filesystem, and a key name generated. system/filesystems/mntwork is in evidence, showing the /mnt/work filesystem. Bellow, we can see standard key names for this filesystem properties. An example is system/filesystems/mntwork/mpoint that contains the value /mnt/work, or system/filesystems/mntwork/type that contains vfat.
The environment variables I want set, when I log in, with their full key name:
user:aviram/env/env1/JAVA_HOME = /usr/lib/jvm/java-1.4.1-ibm-1.4.1.0/jre user:aviram/env/env2/PATH = $PATH:~/bin:$JAVA_HOME/bin user:aviram/env/env2/PS1 = \h:\w\$ user:aviram/env/env3/EDITOR = vi
An example of an elektrified /etc/X11/xorg.conf or /etc/X11/XF86Config:
system/sw/xorg/Layouts/Default Layout/Inputs/Keyboard0/CoreKeyboard = system/sw/xorg/Layouts/Default Layout/Inputs/Mouse0/CorePointer = system/sw/xorg/Layouts/Default Layout/Screens/Screen0/Absolute.x = 0 system/sw/xorg/Layouts/Default Layout/Screens/Screen0/Absolute.y = 0 system/sw/xorg/Layouts/Default Layout/Screens/Screen0/ScreenNumber = 0 system/sw/xorg/Files/FontPath = unix/:7100 system/sw/xorg/Files/RgbPath = /usr/X11R6/lib/X11/rgb system/sw/xorg/Devices/Videocard0/BoardName = Intel 740 (generic) system/sw/xorg/Devices/Videocard0/Driver = i740 system/sw/xorg/Devices/Videocard0/VendorName = Videocard vendor system/sw/xorg/InputDevices/Keyboard0/Driver = keyboard system/sw/xorg/InputDevices/Keyboard0/Options/XkbLayout = us_intl system/sw/xorg/InputDevices/Keyboard0/Options/XkbModel = pc105 system/sw/xorg/InputDevices/Mouse0/Driver = mouse system/sw/xorg/InputDevices/Mouse0/Options/Device = /dev/input/mice system/sw/xorg/InputDevices/Mouse0/Options/Emulate3Buttons = yes system/sw/xorg/InputDevices/Mouse0/Options/Protocol = IMPS/2 system/sw/xorg/InputDevices/Mouse0/Options/ZAxisMapping = 4 5 system/sw/xorg/Monitors/Monitor0/DisplaySize.height = 230 system/sw/xorg/Monitors/Monitor0/DisplaySize.width = 300 system/sw/xorg/Monitors/Monitor0/HorizSync = 30.0 - 61.0 system/sw/xorg/Monitors/Monitor0/ModelName = SyncMaster system/sw/xorg/Monitors/Monitor0/Options/dpms = system/sw/xorg/Monitors/Monitor0/VendorName = Monitor Vendor system/sw/xorg/Monitors/Monitor0/VertRefresh = 56.0 - 75.0 system/sw/xorg/Monitors/.Monitor1/HorizSync = 30.0 - 61.0 system/sw/xorg/Monitors/.Monitor1/ModelName = Impression system/sw/xorg/Monitors/.Monitor1/Options/dpms = system/sw/xorg/Monitors/.Monitor1/VendorName = Monitor Vendor system/sw/xorg/Monitors/.Monitor1/VertRefresh = 56.0 - 75.0 system/sw/xorg/Screens/Screen0/DefaultDepth = 16 system/sw/xorg/Screens/Screen0/Device = Videocard0 system/sw/xorg/Screens/Screen0/Displays/00/Depth = 16 system/sw/xorg/Screens/Screen0/Displays/00/Modes = 1024x768,800x600,640x480 system/sw/xorg/Screens/Screen0/Displays/00/Viewport.x = 0 system/sw/xorg/Screens/Screen0/Displays/00/Viewport.y = 0 system/sw/xorg/Screens/Screen0/Monitor = Monitor0 system/sw/xorg/Modules/dbe = system/sw/xorg/Modules/dri = system/sw/xorg/Modules/extmod = system/sw/xorg/Modules/fbdevhw = system/sw/xorg/Modules/freetype = system/sw/xorg/Modules/glx = system/sw/xorg/Modules/record = system/sw/xorg/Modules/type1 = system/sw/xorg/DRI/Group = 0 system/sw/xorg/DRI/Mode = 0666
Pay attention that the keys bellow system/sw/xorg/Monitor/.Monitor1 are inactive because we have .Monitor1 as their parent. So unless special options are used when calling the API, these keys will not be retrieved from the database.
Throughout our site you will see other examples of key names.