diff options
Diffstat (limited to 'usr.sbin/pc-sysinstall')
-rwxr-xr-x | usr.sbin/pc-sysinstall/backend-query/list-tzones.sh | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/usr.sbin/pc-sysinstall/backend-query/list-tzones.sh b/usr.sbin/pc-sysinstall/backend-query/list-tzones.sh index 640272e..c7009b0 100755 --- a/usr.sbin/pc-sysinstall/backend-query/list-tzones.sh +++ b/usr.sbin/pc-sysinstall/backend-query/list-tzones.sh @@ -25,19 +25,10 @@ # # $FreeBSD$ -rm ${TMPDIR}/.tzonetmp >/dev/null 2>/dev/null - # Backend script which lists all the available timezones for front-ends to display -while read line -do - echo "$line" | grep "^#" >/dev/null 2>/dev/null - if [ "$?" != "0" ] - then - echo "$line" | tr -s "\t" ":" | cut -d ":" -f 3-4 >>${TMPDIR}/.tzonetmp - fi -done < /usr/share/zoneinfo/zone.tab - -sort ${TMPDIR}/.tzonetmp -rm -f ${TMPDIR}/.tzonetmp >/dev/null 2>/dev/null +egrep -v '^#' /usr/share/zoneinfo/zone.tab |\ + tr -s "\t" ":" |\ + cut -d ":" -f 3-4 |\ + sort exit 0 |