]> Zhao Yanbai Git Server - minix.git/commitdiff
Don't source /etc/profile from /etc/rc, but source /etc/rc.timezone as
authorBen Gras <ben@minix3.org>
Tue, 9 Aug 2005 16:58:28 +0000 (16:58 +0000)
committerBen Gras <ben@minix3.org>
Tue, 9 Aug 2005 16:58:28 +0000 (16:58 +0000)
a timezone instead, and set TZ=GMT0 as a default.

etc/profile
etc/rc

index d9c074116f9b644715424a7c1a88b59c289df0af..0673126c47fa1e63b47c1a64f43a253457cb0ec8 100755 (executable)
@@ -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 2358aca1c86d543cf1653a19026ffaa9f07daec4..5a2c824f7a330abf75653e42949985fb8bd9e5cc 100755 (executable)
--- 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