]>
Commit | Line | Data |
---|---|---|
5388ae72 AG |
1 | diff -burN gentoo-0.11.46.orig/src/configure.c gentoo-0.11.46/src/configure.c |
2 | --- gentoo-0.11.46.orig/src/configure.c 2004-02-29 23:09:48.737669968 +0100 | |
3 | +++ gentoo-0.11.46/src/configure.c 2004-02-29 23:24:29.152826520 +0100 | |
4 | @@ -169,6 +169,7 @@ | |
19c5cee4 | 5 | void cfg_save_all(MainInfo *min) |
6 | { | |
7 | gchar *root = "GentooConfig", *home, rcname[PATH_MAX]; | |
5388ae72 | 8 | + gchar *home_etc; |
19c5cee4 | 9 | FILE *out; |
10 | guint i; | |
11 | const CfgModule *page; | |
5388ae72 AG |
12 | @@ -176,6 +177,11 @@ |
13 | if((home = getenv("HOME")) != NULL) | |
19c5cee4 | 14 | { |
5388ae72 AG |
15 | strcpy(rcname, home); |
16 | + if ( (home_etc = getenv("HOME_ETC")) != NULL) | |
17 | + { | |
18 | + strcat(rcname, "/"); | |
19 | + strcat(rcname, home_etc); | |
20 | + }; | |
21 | strcat(rcname, "/" RCNAME); | |
19c5cee4 | 22 | } |
23 | else | |
5388ae72 AG |
24 | @@ -437,11 +443,19 @@ |
25 | guint32 cfg_load_config(MainInfo *min) | |
26 | { | |
27 | XmlNode *tree; | |
28 | - gchar name[PATH_MAX] = "", *hpath; | |
29 | + gchar name[PATH_MAX] = "", *hpath, *home_etc; | |
19c5cee4 | 30 | guint32 i, flags = 0UL; |
31 | ||
32 | - if((hpath = getenv("HOME")) != NULL) | |
5388ae72 AG |
33 | + if((hpath = getenv("HOME")) != NULL) |
34 | + { | |
35 | + //strcpy(hpath, home); | |
36 | + if ( (home_etc = getenv("HOME_ETC")) != NULL) | |
37 | + { | |
38 | + strcat(hpath, "/"); | |
39 | + strcat(hpath, home_etc); | |
40 | + }; | |
41 | g_snprintf(name, sizeof name, "%s" G_DIR_SEPARATOR_S "%s", hpath, RCNAME); | |
42 | + }; | |
19c5cee4 | 43 | |
44 | /* Does the user seem to have a local config? */ | |
45 | if(!fut_can_read_named(name)) | |
5388ae72 | 46 | @@ -464,8 +478,16 @@ |
19c5cee4 | 47 | { |
48 | gchar homename[PATH_MAX] = "", syscfg[PATH_MAX], whine[2 * PATH_MAX]; | |
5388ae72 | 49 | |
19c5cee4 | 50 | - if((hpath = getenv("HOME")) != NULL) |
5388ae72 AG |
51 | + if((hpath = getenv("HOME")) != NULL) |
52 | + { | |
53 | + // strcpy(hpath, home); | |
54 | + if ((home_etc = getenv("HOME_ETC")) != NULL) | |
55 | + { | |
56 | + strcat(hpath, "/"); | |
57 | + strcat(hpath, home_etc); | |
58 | + } | |
59 | g_snprintf(homename, sizeof homename, "%s/%s", hpath, RCNAME); | |
60 | + } | |
19c5cee4 | 61 | |
62 | g_snprintf(syscfg, sizeof syscfg, PATH_CFG G_DIR_SEPARATOR_S "%s", RCNAME + 1); | |
63 | g_snprintf(whine, sizeof whine, _("Couldn't find any configuration file; checked\n" |