devtay
Contact dungog for support on their products
Quick db tutorial (it is really so easy)
just type
db
and then press Enter to get the syntax displayed
which gives
usage:
/sbin/e-smith/db dbfile keys
/sbin/e-smith/db dbfile print [key]
/sbin/e-smith/db dbfile show [key]
/sbin/e-smith/db dbfile get key
/sbin/e-smith/db dbfile set key type [prop1 val1] [prop2 val2] ...
/sbin/e-smith/db dbfile setdefault key type [prop1 val1] [prop2 val2] ...
/sbin/e-smith/db dbfile delete key
/sbin/e-smith/db dbfile printtype [key]
/sbin/e-smith/db dbfile gettype key
/sbin/e-smith/db dbfile settype key type
/sbin/e-smith/db dbfile printprop key [prop1] [prop2] [prop3] ...
/sbin/e-smith/db dbfile getprop key prop
/sbin/e-smith/db dbfile setprop key prop1 val1 [prop2 val2] [prop3 val3] ...
/sbin/e-smith/db dbfile delprop key prop1 [prop2] [prop3] ...
Note that on a properly setup sme7.x (path wise etc) you do not need to include the
/sbin/e-smith/ part
Note also that from sme6 onwards, a shortcut for
db configuration
is
config
Note this only applies to this one often used database file, all others must be referred to using
db dbname xxxx yyyy zzzz
See the Howto section for a couple of articles on db commands that should give useful info ie
http://wiki.contribs.org/DB_Variables_Configurationand
http://wiki.contribs.org/Useful_Commandsand of course refer to the Developers Guide if needed
All db files are in
/home/e-smith/db
A couple of examples to demonstrate useage and syntax correlation
db dbname show
Using real db names
For
/home/e-smith/db/configuration
db configuration show
db configuration show |more
db configuration keys
db configuration show dansguardian
db configuration getprop dansguardian status
which gives (on my system)
enabled
db configuration getprop dansguardian portblocking
which gives (on my system)
yes
compare these elements with the syntax result from issuing the db command
where each element or piece equates to:
db = command
configuration = database name
show = part of a command
keys = party of a command
dansguardian = key
status = property
enabled = value
portblocking = property
yes = value
Apply the above "reasoning" to any database and the the syntax presented by issuing db then makes sense. So easy.
Note that missing (or no) properties and values do not necessarily mean no value is in the /etc/file.conf system, as the template code can have a default value in the absence of a specific db value.
Note to determine what db settings are supported by sme code, or what default value are, refer to (ie read) the code that is in the particular template or custom template associated with a /etc/file.conf
Look in /etc/e-smith/templates/... and /etc/e-smith/templates-custom/....
and subfolders and template fragments applicable to particular /etc/file.conf configuration files.
Note
cd /home/e-smith/db
ls -al
gives (on my system)
total 144
drwxr-xr-x 7 root root 4096 Sep 22 05:32 .
drwxr-xr-x 9 admin admin 4096 Sep 18 14:45 ..
-rw-r----- 1 root admin 14676 Aug 25 22:38 accounts
-rw-r----- 1 root admin 994 Sep 22 05:32 affa
drwx------ 2 root root 4096 Sep 22 05:32 affa-report
-rw-r--r-- 1 root root 15310 Sep 22 05:32 affa-rpmlist
-rw-r----- 1 root admin 2532 Jul 7 15:42 backup2ws
-rw-r----- 1 root admin 1496 Feb 4 2009 backups
-rw-r----- 1 root admin 10040 Sep 15 02:01 configuration
-rw-r----- 1 root admin 531 Feb 3 2009 dar2
-rw-r----- 1 root admin 816 Jun 3 22:11 domains
-rw-r----- 1 root admin 4391 Sep 11 18:03 hosts
drwxr-xr-x 2 root root 4096 Aug 25 22:48 ldap
-rw-r----- 1 root admin 3074 Nov 15 2008 mailpatterns
drwxr-x--- 2 root root 4096 May 29 22:11 mysql
drwxr-xr-x 2 root root 4096 Aug 25 22:49 navigation
-rw-r----- 1 root admin 298 Nov 15 2008 networks
-rw-r--r-- 1 root root 0 Sep 23 2008 open_ro
-rw-r----- 1 root admin 0 Oct 8 2008 portforward_tcp
-rw-r----- 1 root admin 0 Oct 8 2008 portforward_udp
-rw-r--r-- 1 root root 20 Jul 22 2007 proxyusers
-rw-r----- 1 root admin 1489 Jun 24 13:26 spamassassin
-rw-r----- 1 root admin 559 Sep 18 14:45 wbl
drwxr-xr-x 2 root root 4096 Sep 7 11:26 webshare
-rw-r----- 1 root admin 1179 Sep 7 11:30 WebShare
-rw-r--r-- 1 root root 70 Sep 22 04:02 yum_available
-rw-r--r-- 1 root root 70 Sep 22 04:02 yum_installed
-rw-r----- 1 root admin 4351 Sep 21 20:17 yum_repositories
-rw-r--r-- 1 root root 70 Sep 22 04:02 yum_updates
end of tutorial