Changeset 688b57d


Ignore:
Timestamp:
Oct 18, 2013 10:49:37 AM (6 months ago)
Author:
Kris Moore <kris@…>
Branches:
master, 9.2-release, releng/10.0, releng/10.0.1
Children:
5a1d1a0
Parents:
8d3682c
Message:

Add support to detect users time-zone as well as location

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src-qt4/pc-installgui/backend.cpp

    r8d3682c r688b57d  
    244244       code = p.readLine().simplified(); 
    245245    } 
     246    code = code.section(" ", 0, 0); 
    246247    qDebug() << "Found Country Code:" << code; 
    247248    return code; 
  • src-sh/pc-sysinstall/backend-query/detect-country.sh

    re8cdd4d r688b57d  
    2828fetch -o "/tmp/.dR.$$" "http://web.pcbsd.org/getlocale.php" >/dev/null 2>/dev/null 
    2929COUNTRY="`grep CountryCode: /tmp/.dR.$$ | awk '{print $2}' | tr '[:upper:]' '[:lower:]' | sed 's| ||g'`" 
     30TZ="`grep TimeZone: /tmp/.dR.$$ | awk '{print $2}'`" 
    3031rm /tmp/.dR.$$ 
    3132if [ -z "$COUNTRY" ] ; then 
     
    3435fi 
    3536 
    36 echo "$COUNTRY" 
     37echo "$COUNTRY $TZ" 
    3738exit 0 
  • src-sh/pc-sysinstall/pc-sysinstall

    re8cdd4d r688b57d  
    138138  ;; 
    139139 
    140   # Check what country the system IP resolves to 
     140  # Get geo-location data for this system 
    141141  detect-country) ${QUERYDIR}/detect-country.sh 
    142142  ;; 
Note: See TracChangeset for help on using the changeset viewer.