From: <abe...@us...> - 2013-02-27 17:12:55
|
Revision: 5971 http://astlinux.svn.sourceforge.net/astlinux/?rev=5971&view=rev Author: abelbeck Date: 2013-02-27 17:12:48 +0000 (Wed, 27 Feb 2013) Log Message: ----------- Add Debian style /etc/timezone file defined as validated TIMEZONE variable - required for PHP 5.4 at a later time. Display an error if the TIMEZONE variable is invalid, and remove old unused /mnt/kd and /stat TZ fallback methods. Modified Paths: -------------- branches/1.0/project/astlinux/target_skeleton/etc/rc branches/1.0/project/astlinux/target_skeleton/stat/etc/rc.conf Added Paths: ----------- branches/1.0/project/astlinux/target_skeleton/etc/timezone Modified: branches/1.0/project/astlinux/target_skeleton/etc/rc =================================================================== --- branches/1.0/project/astlinux/target_skeleton/etc/rc 2013-02-25 17:46:56 UTC (rev 5970) +++ branches/1.0/project/astlinux/target_skeleton/etc/rc 2013-02-27 17:12:48 UTC (rev 5971) @@ -322,12 +322,14 @@ fi # glibc/zoneinfo style TZ support - if [ -n "$TIMEZONE" -a -f "/usr/share/zoneinfo/$TIMEZONE" ]; then + if [ -z "$TIMEZONE" ]; then + TIMEZONE="UTC" + fi + if [ -f "/usr/share/zoneinfo/$TIMEZONE" ]; then ln -sf "/usr/share/zoneinfo/$TIMEZONE" /tmp/etc/localtime - elif [ -f /mnt/kd/localtime ]; then - ln -sf /mnt/kd/localtime /tmp/etc/localtime - elif [ -f /stat/etc/localtime ]; then - ln -sf /stat/etc/localtime /tmp/etc/localtime + echo "$TIMEZONE" > /tmp/etc/timezone + else + echo "Invalid Timezone: $TIMEZONE" >&2 fi # /etc/TZ Timezone support @@ -336,10 +338,6 @@ fi if [ -n "$TZ_TIMEZONE" ]; then echo "$TZ_TIMEZONE" > /tmp/etc/TZ - elif [ -f /mnt/kd/TZ ]; then - cp /mnt/kd/TZ /tmp/etc/TZ - elif [ -f /stat/etc/TZ ]; then - cp /stat/etc/TZ /tmp/etc/TZ fi if [ "$PERSISTLOG" = "yes" ]; then Added: branches/1.0/project/astlinux/target_skeleton/etc/timezone =================================================================== --- branches/1.0/project/astlinux/target_skeleton/etc/timezone (rev 0) +++ branches/1.0/project/astlinux/target_skeleton/etc/timezone 2013-02-27 17:12:48 UTC (rev 5971) @@ -0,0 +1 @@ +link /tmp/etc/timezone \ No newline at end of file Property changes on: branches/1.0/project/astlinux/target_skeleton/etc/timezone ___________________________________________________________________ Added: svn:special + * Modified: branches/1.0/project/astlinux/target_skeleton/stat/etc/rc.conf =================================================================== --- branches/1.0/project/astlinux/target_skeleton/stat/etc/rc.conf 2013-02-25 17:46:56 UTC (rev 5970) +++ branches/1.0/project/astlinux/target_skeleton/stat/etc/rc.conf 2013-02-27 17:12:48 UTC (rev 5971) @@ -29,10 +29,12 @@ HOSTNAME=pbx ## Timezone -## If you define this variable, AstLinux will link this file from -## /usr/share/zoneinfo/$TIMEZONE to /etc/localtime on startup -## GMT (UTC) is the default -#TIMEZONE=America/Chicago +## Set the Timezone using the zoneinfo database. Defining TIMEZONE will: +## 1) symlink /usr/share/zoneinfo/$TIMEZONE to /etc/localtime +## 2) define /etc/timezone with string $TIMEZONE (Debian style) +## 3) define /etc/TZ with trailing string from /etc/localtime +## "UTC" is the default TIMEZONE +#TIMEZONE="America/Chicago" ## Time Server ## Define the NTP server that AstLinux will sync against upon bootup. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |