From a2205219029fde243e04d4fa4bc7641e1c50d681 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sun, 18 Sep 2011 01:49:08 +0000 Subject: 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 --- kdm/kfrontend/kdm_config.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'kdm/kfrontend/kdm_config.c') 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) { } -- cgit v1.2.1