I rewrote the data storage part of cfgtool. It now stores all variables in one file, to avoid wasting storage. The one file is a binary file, which is not very nice, but it should be a portable one, assuming 8 bit chars and character sets and so on. I append the manual page. It's not a good idea to use this until after Debian 1.2 is released. I'm not going to upload it to master before that. If you want to play with it, fetch it from <http://www.iki.fi/liw/programs/>. There's the usual Debian files. Report bugs directly to me. Thanks. If someone wants to have a go at writing a user interface that lets an admin more easily view and modify the variables, don't hesitate to start now. NAME cfgtool - manipulate system configuration variables SYNOPSIS cfgtool [--create variable value] [--destroy variable] [--get variable] [--set variable value] [--get-help vari able] [--set-help variable helpfile language] [--is-true variable] [--is-false variable] [--exists variable] [--lock] [--unlock] [--locked] [--list-all] [--create-all] [--set-all] [--repository directory] [--init-repository directory] DESCRIPTION cfgtool manages a database of system configuration vari ables. This should not be used to configure application type pro grams. Applications should use their own configuration file, because cfgtool is not portable. OPTIONS --init-repository data-directory lock-direcotry Create and initialize the repository. The data- directory is created, the lock-directory must exist or be the same as the data one. --get variable Print value of variable to stdout. --set variable value Set value of variable to value The variable must exist. --create variable value Create a new variable and set its initial value. It is not an error for the variable to exist already. If it does, nothing happens; the value of the variable is not changed. --destroy variable Destroy a variable. --set-help variable helpfile language Set description of variable in some given language. English is "en". Note that LANG is not obeyed for this option. --get-help variable Output description of variable to stdout. LANG is obeyed. --is-true variable Check whether variable exists and contains the value "yes". Don't output anything, just set the exit code. --is-false variable Opposite of --is-false: condition is true, if vari able exists and contains the value "no" (actually, any value but "yes"). --lock Lock variable repository. This is needed only when you need to lock the repository over several invo cations of cfgtool. The repository is locked auto matically, if it hasn't already been locked, but an implicit lock is also removed automatically. Avoid locking the repository for long periods of time. --unlock Unlock variable repository. --locked The variable repository was locked by an earlier process, but we own the lock. This prevents creat ing an implicit lock. If we created an explicit lock with --lock already, the implicit lock fails and then the whole operation fails. This must be the first option, except for --repository, if it used at all. --list List all existing variable names, one per line. --exists variable Test whether a variable exists. --list-all Output octet stream to stdout that contains all variables in repository. --create-all Read octet stream from stdin and create all missing variables. --set-all Read octet stream from stdin and create or set all variables. --repository directory Use directory as the repository, instead of default location. Must be first. ENVIRONMENT LANG Language for help files, when reading them. Default is "en" for English. -- Please read <http://www.iki.fi/liw/mail-to-lasu.html> before mailing me. Please don't Cc: me when replying to my message on a mailing list.
Attachment:
pgp8uWA8r8gcE.pgp
Description: PGP signature