]>
Commit | Line | Data |
---|---|---|
1e38b5a8 | 1 | diff -u -r --from-file=gentoo-0.11.55/ gentoo-0.11.55/src/configure.c gentoo-0.11.55-home_etc/src/configure.c |
2 | --- gentoo-0.11.55/src/configure.c 2003-10-12 15:45:23.000000000 +0200 | |
3 | +++ gentoo-0.11.55-home_etc/src/configure.c 2005-06-24 00:11:12.000000000 +0200 | |
4 | @@ -173,14 +173,22 @@ | |
19c5cee4 | 5 | guint i; |
6 | const CfgModule *page; | |
1e38b5a8 | 7 | |
8 | + if((home = getenv("HOME_ETC")) != NULL) | |
9 | + { | |
10 | + strcpy(rcname, home); | |
11 | + strcat(rcname, "/" RCNAME); | |
12 | + } | |
13 | + | |
14 | + else { | |
5388ae72 | 15 | if((home = getenv("HOME")) != NULL) |
19c5cee4 | 16 | { |
5388ae72 | 17 | strcpy(rcname, home); |
5388ae72 | 18 | strcat(rcname, "/" RCNAME); |
1e38b5a8 | 19 | + |
19c5cee4 | 20 | } |
21 | else | |
1e38b5a8 | 22 | return; |
23 | - | |
24 | + } | |
25 | cfg_modified_clear(min); | |
26 | if((out = xml_put_open(rcname)) != NULL) | |
27 | { | |
28 | @@ -440,9 +448,15 @@ | |
29 | gchar name[PATH_MAX] = "", *hpath; | |
19c5cee4 | 30 | guint32 i, flags = 0UL; |
31 | ||
32 | - if((hpath = getenv("HOME")) != NULL) | |
1e38b5a8 | 33 | + if((hpath = getenv("HOME_ETC")) != NULL) { |
5388ae72 | 34 | g_snprintf(name, sizeof name, "%s" G_DIR_SEPARATOR_S "%s", hpath, RCNAME); |
1e38b5a8 | 35 | - |
36 | + } | |
37 | + else { | |
38 | + if((hpath = getenv("HOME")) != NULL) { | |
39 | + g_snprintf(name, sizeof name, "%s" G_DIR_SEPARATOR_S "%s", hpath, RCNAME); | |
40 | + } | |
41 | + } | |
42 | + | |
19c5cee4 | 43 | /* Does the user seem to have a local config? */ |
44 | if(!fut_can_read_named(name)) | |
1e38b5a8 | 45 | g_snprintf(name, sizeof name, PATH_CFG G_DIR_SEPARATOR_S "%s", RCNAME + 1); /* Nope, check for global one. */ |
46 | @@ -464,9 +478,14 @@ | |
19c5cee4 | 47 | { |
48 | gchar homename[PATH_MAX] = "", syscfg[PATH_MAX], whine[2 * PATH_MAX]; | |
5388ae72 | 49 | |
1e38b5a8 | 50 | + if((hpath = getenv("HOME_ETC")) != NULL) { |
51 | + g_snprintf(homename, sizeof homename, "%s/%s", hpath, RCNAME); | |
52 | + } | |
53 | + else { | |
54 | if((hpath = getenv("HOME")) != NULL) | |
5388ae72 | 55 | g_snprintf(homename, sizeof homename, "%s/%s", hpath, RCNAME); |
1e38b5a8 | 56 | - |
5388ae72 | 57 | + } |
1e38b5a8 | 58 | + |
19c5cee4 | 59 | g_snprintf(syscfg, sizeof syscfg, PATH_CFG G_DIR_SEPARATOR_S "%s", RCNAME + 1); |
60 | g_snprintf(whine, sizeof whine, _("Couldn't find any configuration file; checked\n" | |
1e38b5a8 | 61 | "both \"%s\" and \"%s\".\n" |