diff options
author | Mike Frysinger <vapier@gentoo.org> | 2008-03-22 23:49:37 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2008-03-22 23:49:37 +0000 |
commit | 5aeb55a7969d59a0fe28f41e9948091b039f7cff (patch) | |
tree | 555d3b31b9a9372b0be6d31d18f8e376203d2ddd /sys-libs/timezone-data | |
parent | Switched to EAPI=1 slot deps. (diff) | |
download | gentoo-2-5aeb55a7969d59a0fe28f41e9948091b039f7cff.tar.gz gentoo-2-5aeb55a7969d59a0fe28f41e9948091b039f7cff.tar.bz2 gentoo-2-5aeb55a7969d59a0fe28f41e9948091b039f7cff.zip |
Add support for /etc/timezone.
(Portage version: 2.2_pre5)
Diffstat (limited to 'sys-libs/timezone-data')
-rw-r--r-- | sys-libs/timezone-data/ChangeLog | 6 | ||||
-rw-r--r-- | sys-libs/timezone-data/timezone-data-2008a.ebuild | 32 |
2 files changed, 25 insertions, 13 deletions
diff --git a/sys-libs/timezone-data/ChangeLog b/sys-libs/timezone-data/ChangeLog index ec2d35a25017..8d14a5b6144f 100644 --- a/sys-libs/timezone-data/ChangeLog +++ b/sys-libs/timezone-data/ChangeLog @@ -1,6 +1,10 @@ # ChangeLog for sys-libs/timezone-data # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/timezone-data/ChangeLog,v 1.119 2008/03/10 15:23:32 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/timezone-data/ChangeLog,v 1.120 2008/03/22 23:49:37 vapier Exp $ + + 22 Mar 2008; Mike Frysinger <vapier@gentoo.org> + timezone-data-2008a.ebuild: + Add support for /etc/timezone. *timezone-data-2008a (10 Mar 2008) diff --git a/sys-libs/timezone-data/timezone-data-2008a.ebuild b/sys-libs/timezone-data/timezone-data-2008a.ebuild index c98d7363656b..612ba65f3326 100644 --- a/sys-libs/timezone-data/timezone-data-2008a.ebuild +++ b/sys-libs/timezone-data/timezone-data-2008a.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2008 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/timezone-data/timezone-data-2008a.ebuild,v 1.1 2008/03/10 15:23:32 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/timezone-data/timezone-data-2008a.ebuild,v 1.2 2008/03/22 23:49:37 vapier Exp $ inherit eutils toolchain-funcs flag-o-matic @@ -52,21 +52,29 @@ src_install() { pkg_config() { # make sure the /etc/localtime file does not get stale #127899 - local tz=$(unset TIMEZONE ; source "${ROOT}"/etc/conf.d/clock ; echo ${TIMEZONE-FOOKABLOIE}) - [[ -z ${tz} ]] && return 0 - if [[ ${tz} == "FOOKABLOIE" ]] ; then - elog "You do not have TIMEZONE set in /etc/conf.d/clock." - 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." + local tz src + + if [[ -e ${ROOT}/etc/timezone ]] ; then + src="/etc/timezone" + tz=$(<"${ROOT}"/etc/timezone) + else + src="/etc/conf.d/clock" + tz=$(unset TIMEZONE ; source "${ROOT}"/etc/conf.d/clock ; echo ${TIMEZONE-FOOKABLOIE}) + [[ -z ${tz} ]] && return 0 + if [[ ${tz} == "FOOKABLOIE" ]] ; then + elog "You do not have TIMEZONE set in /etc/conf.d/clock." + 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 - return 0 fi if [[ ! -e ${ROOT}/usr/share/zoneinfo/${tz} ]] ; then - elog "You have an invalid TIMEZONE setting in /etc/conf.d/clock." + elog "You have an invalid TIMEZONE setting in ${src}" elog "Your /etc/localtime has been reset to Factory; enjoy!" tz="Factory" fi |