* Removed some temporary diagnostics that had been left in serv_sieve.c
[citadel.git] / citadel / guesstimezone.sh
blob90493fd170754c0830280290fc1399f78ed99a5b
1 #!/bin/sh
3 # guesstimezone.sh - an ugly hack of a script to try to guess the time
4 # zone currently in use on the host system, and output its name.
6 # Copyright (c) by Art Cancro
8 # This program is free software; you can redistribute it and/or modify it
9 # under the terms of the GNU General Public License as published by the Free
10 # Software Foundation; either version 3 of the License, or (at your option)
11 # any later version.
13 # This program is distributed in the hope that it will be useful, but WITHOUT
14 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 # FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 # more details.
18 # You should have received a copy of the GNU General Public License along
19 # with this program; if not, write to the Free Software Foundation, Inc.,
20 # 675 Mass Ave, Cambridge, MA 02139, USA.
22 md5sum </dev/null >/dev/null 2>/dev/null || exit 1
24 LOCALTIMESUM=`md5sum /etc/localtime | awk ' { print $1 } ' 2>/dev/null`
25 find /usr/share/zoneinfo -type f -print | while read filename
27 THISTIMESUM=`md5sum $filename | awk ' { print $1 } '`
28 if [ $LOCALTIMESUM = $THISTIMESUM ] ; then
29 echo $filename | cut -c21-
30 exit 0
32 done 2>/dev/null
33 exit 2