1 dsc -- damn small configuration utility.
2 dsc is very similar to OpenWRT's Unified Configuration Interface.
3 It keeps configuration values in a hierarchical directory layout.
4 It has an explicit schema defining what values can be set and how
5 they must be sanitised.
7 There are three environmental variables used:
8 * DSC_SCHEMA -- path to the directory with the schema
9 * DSC_SAVED -- path to the directory with saved (committed) configuration
10 * DSC_STASH -- path to the directory with stash (current) uncommitted one
12 Option's value foo/bar is located in the saved/stash directory in the
13 "foo" subdirectory, "bar" file.
15 $ dsc set foo/bar "my value"
21 There are two kind of options: scalar ones, and a dynamic list ones.
23 $ dsc add net/iface-name0
24 $ dsc add net/iface-name1
28 $ dsc del net/iface-name0
31 $ dsc set net/iface-name1/mtu 1300
33 Schema is a directory with the same hierarchy, but each option is a
34 directory, that contains:
36 * "title" file -- with the brief single line description
37 * optional "descr" file -- with descriptive information
38 * executable "check" file, that is run when option either is set, or get
39 with an empty value. It takes a single argument -- option name. Value
40 is read from stdin. If value is not valid, then checker must return
41 bad return code, writing the descriptive message to stderr. Otherwise
42 the sanitised value is read from stdout. If an input is empty, then
43 checker may print default value of the option
45 Option having "*" name is treated like a dynamic list.
47 By default all options you set are saved in the stash. "commit" command
48 will move it to the saved directory. "diff" allows you to see the
49 difference between the stash and saved directories.