diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-09-18 01:49:08 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-09-18 01:49:08 +0000 |
commit | a2205219029fde243e04d4fa4bc7641e1c50d681 (patch) | |
tree | 164a1505af03c64adf15da686078d0324bc4bbbe /kdm | |
parent | 5118af588a78da1b40de35d3e1cf2b8e860b4d2a (diff) | |
download | tdebase-a2205219029fde243e04d4fa4bc7641e1c50d681.tar.gz tdebase-a2205219029fde243e04d4fa4bc7641e1c50d681.zip |
Add a new configuration file kdmdistrc to kdm that, if present, overrides the default kdmrc settings
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1254121 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdm')
-rw-r--r-- | kdm/kfrontend/kdm_config.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/kdm/kfrontend/kdm_config.c b/kdm/kfrontend/kdm_config.c index 5d188e33d..d8dba0412 100644 --- a/kdm/kfrontend/kdm_config.c +++ b/kdm/kfrontend/kdm_config.c @@ -382,6 +382,7 @@ PautoLoginX( Value *retval ) CONF_READ_ENTRIES static const char *kdmrc = KDMCONF "/kdmrc"; +static const char *kdmrc_dist = KDMCONF "/kdmdistrc"; static Section *rootsec; @@ -402,9 +403,15 @@ ReadConf() return; confread = 1; - Debug( "reading config %s ...\n", kdmrc ); - if (!readFile( &file, kdmrc, "master configuration" )) - return; + Debug( "reading config %s ...\n", kdmrc_dist ); + if (!readFile( &file, kdmrc_dist, "master configuration" )) { + Debug( "reading config %s ...\n", kdmrc ); + if (!readFile( &file, kdmrc, "master configuration" )) + return; + } + else { + kdmrc = kdmrc_dist; + } for (s = file.buf, line = 0, cursec = 0, sectmoan = 1; s < file.eof; s++) { line++; @@ -1374,7 +1381,7 @@ int main( int argc ATTR_UNUSED, char **argv ) /* Debug ("parsing command line\n");*/ if (**++argv) - kdmrc = *argv; + kdmrc_dist = kdmrc = *argv; /* while (*++argv) { } |