From: Ben Gras Date: Tue, 9 Aug 2005 16:58:28 +0000 (+0000) Subject: Don't source /etc/profile from /etc/rc, but source /etc/rc.timezone as X-Git-Tag: v3.1.0~387 X-Git-Url: http://zhaoyanbai.com/repos/?a=commitdiff_plain;h=09a57f885a775ee8381e6171cb1a5b0a2e7ebbc2;p=minix.git Don't source /etc/profile from /etc/rc, but source /etc/rc.timezone as a timezone instead, and set TZ=GMT0 as a default. --- diff --git a/etc/profile b/etc/profile index d9c074116..0673126c4 100755 --- a/etc/profile +++ b/etc/profile @@ -1,3 +1,5 @@ -# Set timezone. - -TZ='GMT0' export TZ +RC_TZ=/etc/rc.timezone +export TZ=GMT0 +if [ -f "$RC_TZ" ] +then . "$RC_TZ" +fi diff --git a/etc/rc b/etc/rc index 2358aca1c..5a2c824f7 100755 --- a/etc/rc +++ b/etc/rc @@ -3,6 +3,7 @@ umask 022 TERM="${TERM-minix}" PATH=/usr/local/bin:/bin:/usr/bin:/usr/sbin +RC_TZ=/etc/rc.timezone export TERM PATH usage() @@ -63,7 +64,10 @@ start) echo . # Set timezone. - . /etc/profile + export TZ=GMT0 + if [ -f "$RC_TZ" ] + then . "$RC_TZ" + fi # Try to read the hardware real-time clock, otherwise do it manually. readclock || intr date -q