Summary: | /etc/localtime is overwritten | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Juergen Rose <rose> |
Component: | [OLD] Unspecified | Assignee: | Gentoo Linux bug wranglers <bug-wranglers> |
Status: | RESOLVED INVALID | ||
Severity: | normal | CC: | loki_val |
Priority: | High | ||
Version: | 2007.0 | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Juergen Rose
2008-10-15 08:03:55 UTC
Probably sth. like this : https://bugs.gentoo.org/show_bug.cgi?id=87519 ? This is really the way it's supposed to be, but there is one undocumented way to avoid it, though it will probably not win any beauty contests. If you're using baselayout-1, in /etc/conf.d/clock set the variable TIMEZONE to be equal to FOOKABLOIE. If you're using baselayout-2, do: echo FOOKABLOIE > /etc/timezone And that should be it. But what you're experiencing is not a bug, so I will close this as invalid. Hi Peter, I have baselayout-2.0.0. At my older computer I find a file /etc/timezone with the contents: TIMEZONE="Europe/Berlin" So you mean I can overwrite them with FOOKABLOIE ? (In reply to comment #3) > Hi Peter, > I have baselayout-2.0.0. At my older computer I find a file /etc/timezone with > the contents: > TIMEZONE="Europe/Berlin" > > So you mean I can overwrite them with > FOOKABLOIE ? If you're using baselayout-2, that should do it. You can read the timezone-data ebuild to understand why. FOOKABLOIE is the value TIMEZONE is set to if no timezone is set, which causes updating of the localtime file to be aborted. Excerpt: # make sure the /etc/localtime file does not get stale #127899 local tz src if has_version '<sys-apps/baselayout-2' ; then src="/etc/conf.d/clock" tz=$(unset TIMEZONE ; source "${ROOT}"/etc/conf.d/clock ; echo ${TIMEZONE-FOOKABLOIE}) else src="/etc/timezone" if [[ -e ${ROOT}/etc/timezone ]] ; then tz=$(<"${ROOT}"/etc/timezone) else tz="FOOKABLOIE" fi fi [[ -z ${tz} ]] && return 0 if [[ ${tz} == "FOOKABLOIE" ]] ; then elog "You do not have TIMEZONE set in ${src}." if [[ ! -e ${ROOT}/etc/localtime ]] ; then cp -f "${ROOT}"/usr/share/zoneinfo/Factory "${ROOT}"/etc/localtime elog "Setting /etc/localtime to Factory." else elog "Skipping auto-update of /etc/localtime." fi return 0 fi if [[ ! -e ${ROOT}/usr/share/zoneinfo/${tz} ]] ; then elog "You have an invalid TIMEZONE setting in ${src}" elog "Your /etc/localtime has been reset to Factory; enjoy!" tz="Factory" fi einfo "Updating /etc/localtime with /usr/share/zoneinfo/${tz}" [[ -L ${ROOT}/etc/localtime ]] && rm -f "${ROOT}"/etc/localtime cp -f "${ROOT}"/usr/share/zoneinfo/"${tz}" "${ROOT}"/etc/localtime Thank you for explanation. Juergen (In reply to comment #2) > If you're using baselayout-2, do: > echo FOOKABLOIE > /etc/timezone Rather: echo -n > /etc/timezone (In reply to comment #4) > FOOKABLOIE is the value TIMEZONE is set to if no timezone is set, which > causes updating of the localtime file to be aborted. FOOKABLOIE is the value of tz variable when /etc/timezone doesn't exist or exists and contains FOOKABLOIE. Update of /etc/localtime is skipped when tz variable is unset or set and empty (i.e. when /etc/timezone is empty). |