1 diff -Nru gentoo-0.11.34/src/configure.c gentoo-0.11.34.new/src/configure.c
2 --- gentoo-0.11.34/src/configure.c Sat Sep 7 08:59:47 2002
3 +++ gentoo-0.11.34.new/src/configure.c Sat Mar 29 13:00:55 2003
5 void cfg_save_all(MainInfo *min)
7 gchar *root = "GentooConfig", *home, rcname[PATH_MAX];
11 const CfgModule *page;
13 - if((home = getenv("HOME")) != NULL)
15 + if((etc_dir = getenv("ETC_DIR")) != NULL)
17 - strcpy(rcname, home);
18 - strcat(rcname, "/" RCNAME);
19 + strcpy(rcname, etc_dir);
20 + strcat(rcname, "/" ETC_DIR_RCNAME);
24 + if((home = getenv("HOME")) != NULL)
26 + strcpy(rcname, home);
27 + strcat(rcname, "/" RCNAME);
33 cfg_modified_clear(min);
34 if((out = xml_put_open(rcname)) != NULL)
37 gchar name[PATH_MAX] = "", *hpath;
38 guint32 i, flags = 0UL;
40 - if((hpath = getenv("HOME")) != NULL)
41 - g_snprintf(name, sizeof name, "%s" G_DIR_SEPARATOR_S "%s", hpath, RCNAME);
42 + if((hpath = getenv("ETC_DIR")) != NULL)
43 + g_snprintf(name, sizeof name, "%s" G_DIR_SEPARATOR_S "%s", hpath, ETC_DIR_RCNAME);
45 + if((hpath = getenv("HOME")) != NULL)
46 + g_snprintf(name, sizeof name, "%s" G_DIR_SEPARATOR_S "%s", hpath, RCNAME);
48 /* Does the user seem to have a local config? */
49 if(!fut_can_read_named(name))
53 gchar homename[PATH_MAX] = "", syscfg[PATH_MAX], whine[2 * PATH_MAX];
55 - if((hpath = getenv("HOME")) != NULL)
56 - g_snprintf(homename, sizeof homename, "%s/%s", hpath, RCNAME);
58 + if((hpath = getenv("ETC_DIR")) != NULL)
59 + g_snprintf(homename, sizeof homename, "%s/%s", hpath, ETC_DIR_RCNAME);
61 + if((hpath = getenv("HOME")) != NULL)
62 + g_snprintf(homename, sizeof homename, "%s/%s", hpath, RCNAME);
64 g_snprintf(syscfg, sizeof syscfg, PATH_CFG G_DIR_SEPARATOR_S "%s", RCNAME + 1);
65 g_snprintf(whine, sizeof whine, _("Couldn't find any configuration file; checked\n"
66 diff -Nru gentoo-0.11.34/src/gentoo.h gentoo-0.11.34.new/src/gentoo.h
67 --- gentoo-0.11.34/src/gentoo.h Sun Sep 1 17:41:41 2002
68 +++ gentoo-0.11.34.new/src/gentoo.h Sat Mar 29 12:56:24 2003
70 /* ----------------------------------------------------------------------------------------- */
72 #define RCNAME ".gentoorc"
73 +#define ETC_DIR_RCNAME "gentoorc"
75 /* ----------------------------------------------------------------------------------------- */