mirror of
https://github.com/tuxbox-neutrino/neutrino.git
synced 2025-09-01 09:51:22 +02:00
- setting_helpers: remove some hardcoded paths
Signed-off-by: Thilo Graf <dbt@novatux.de>
This commit is contained in:
@@ -498,7 +498,7 @@ bool CTZChangeNotifier::changeNotify(const neutrino_locale_t, void * Data)
|
|||||||
const char *zptr = xmlGetAttribute(search, "zone");
|
const char *zptr = xmlGetAttribute(search, "zone");
|
||||||
if(zptr)
|
if(zptr)
|
||||||
zone = zptr;
|
zone = zptr;
|
||||||
if (!access("/usr/share/zoneinfo/" + zone, R_OK))
|
if (!access(DATADIR "/zoneinfo/" + zone, R_OK))
|
||||||
found = true;
|
found = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -509,7 +509,7 @@ bool CTZChangeNotifier::changeNotify(const neutrino_locale_t, void * Data)
|
|||||||
}
|
}
|
||||||
if(found) {
|
if(found) {
|
||||||
printf("Timezone: %s -> %s\n", name.c_str(), zone.c_str());
|
printf("Timezone: %s -> %s\n", name.c_str(), zone.c_str());
|
||||||
std::string cmd = "/usr/share/zoneinfo/" + zone;
|
std::string cmd = DATADIR "/zoneinfo/" + zone;
|
||||||
printf("symlink %s to /etc/localtime\n", cmd.c_str());
|
printf("symlink %s to /etc/localtime\n", cmd.c_str());
|
||||||
if (unlink("/etc/localtime"))
|
if (unlink("/etc/localtime"))
|
||||||
perror("unlink failed");
|
perror("unlink failed");
|
||||||
|
Reference in New Issue
Block a user