diff options
author | Dieter Plaetinck <dieter@plaetinck.be> | 2011-05-07 23:19:17 +0200 |
---|---|---|
committer | Dieter Plaetinck <dieter@plaetinck.be> | 2011-05-07 23:40:00 +0200 |
commit | 3c9483c433ec200a8cb35cb978ae4d9e9c994f3c (patch) | |
tree | eb42bfd81d97cef09c900a53a436f5ad5413b268 /src/core/libs/lib-misc.sh | |
parent | cfeaf0e3b7d8c2b75cf66361e330906f4fed5f7d (diff) |
bugfix: deal correctly with /etc/localtime. Fixes FS#24119
* always execute copy_timezone_file (), whether the user changed the timezone or
not, and no matter which procedure we're running. (specifically automatic procedure!)
if $TIMEZONE is set, it will create /etc/localtime appropriately on the live system
* make target_localtime () - executed through postconfigure_target () -
compatible with the case where no /etc/localtime file exists.
Diffstat (limited to 'src/core/libs/lib-misc.sh')
-rw-r--r-- | src/core/libs/lib-misc.sh | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/core/libs/lib-misc.sh b/src/core/libs/lib-misc.sh index 2dee841..f9fd06a 100644 --- a/src/core/libs/lib-misc.sh +++ b/src/core/libs/lib-misc.sh @@ -165,6 +165,14 @@ target_configure_time () { ${var_TARGET_DIR}/etc/rc.conf } +target_localtime () { + if [ -f /etc/localtime ] + then + cp /etc/localtime ${var_TARGET_DIR}/etc/localtime || return 1 + fi + return 0 +} + # apped string after last line matching regex in a file. # $1 regex # $2 string (can contain "\n", "\t" etc) |