summaryrefslogtreecommitdiffstats
path: root/kdm
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-09-18 01:49:08 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-09-18 01:49:08 +0000
commita2205219029fde243e04d4fa4bc7641e1c50d681 (patch)
tree164a1505af03c64adf15da686078d0324bc4bbbe /kdm
parent5118af588a78da1b40de35d3e1cf2b8e860b4d2a (diff)
downloadtdebase-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.c15
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) {
}