CasperSecurity

Current Path : /var/lib/dpkg/info/
Upload File :
Current File : /var/lib/dpkg/info/tzdata.config

#! /bin/sh
set -e

. /usr/share/debconf/confmodule
db_version 2.0
db_capb backup

convert_timezone()
{
    case "$1" in
	(right/*|posix/*)
	    convert_timezone "${1#*/}"
	    ;;
	("Africa/Asmera")
	    echo "Africa/Asmara"
	    ;;
	("America/Argentina/ComodRivadavia"|"America/Catamarca")
	    echo "America/Argentina/Catamarca"
	    ;;
	("America/Buenos_Aires")
	    echo "America/Argentina/Buenos_Aires"
	    ;;
	("America/Cordoba"|"America/Rosario")
	    echo "America/Argentina/Cordoba"
	    ;;
	"America/Fort_Wayne" | "America/Indianapolis")
	    echo "America/Indiana/Indianapolis"
	    ;;
	("America/Jujuy")
	    echo "America/Argentina/Jujuy"
	    ;;
	"America/Knox_IN")
	    echo "America/Indiana/Knox"
	    ;;
	"America/Louisville")
	    echo "America/Kentucky/Louisville"
	    ;;
	("America/Mendoza")
	    echo "America/Argentina/Mendoza"
	    ;;
	("Antarctica/South_Pole")
	    echo "Antarctica/McMurdo"
	    ;;
        "Asia/Ashkhabad")
            echo "Asia/Ashgabat"
            ;;
        ("Asia/Calcutta")
            echo "Asia/Kolkata"
            ;;
        "Asia/Chungking")
            echo "Asia/Chongqing"
            ;;
        "Asia/Dacca")
            echo "Asia/Dhaka"
            ;;
	"Asia/Riyadh87"|"Asia/Riyadh88"|"Asia/Riyadh89")
            echo "Asia/Riyadh"
	    ;;
        ("Asia/Katmandu")
            echo "Asia/Kathmandu"
            ;;
        "Asia/Macao")
            echo "Asia/Macau"
            ;;
        ("Asia/Rangoon")
            echo "Asia/Yangon"
            ;;
        ("Asia/Saigon")
            echo "Asia/Ho_Chi_Minh"
            ;;
        "Asia/Thimbu")
            echo "Asia/Thimphu"
            ;;
        "Asia/Ulan_Bator")
            echo "Asia/Ulaanbaatar"
            ;;
        "Atlantic/Faeroe")
            echo "Atlantic/Faroe"
            ;;
        "Australia/ACT" | "Australia/NSW")
            echo "Australia/Sydney"
            ;;
        "Australia/LHI")
            echo "Australia/Lord_Howe"
            ;;
        "Australia/North")
            echo "Australia/Darwin"
            ;;
        "Australia/Queensland")
            echo "Australia/Brisbane"
            ;;
        "Australia/South")
            echo "Australia/Adelaide"
            ;;
        "Australia/Tasmania")
            echo "Australia/Hobart"
            ;;
        "Australia/Victoria")
            echo "Australia/Melbourne"
            ;;
        "Australia/West")
            echo "Australia/Perth"
            ;;
        "Brazil/Acre")
            echo "America/Rio_Branco"
            ;;
        "Brazil/DeNoronha")
            echo "America/Noronha"
            ;;
        "Brazil/East")
            echo "America/Sao_Paulo"
            ;;
        "Brazil/West")
            echo "America/Manaus"
            ;;
        "Canada/Atlantic")
            echo "America/Halifax"
            ;;
        "Canada/Central")
            echo "America/Winnipeg"
            ;;
        "Canada/East-Saskatchewan")
            echo "America/Regina"
            ;;
        "Canada/Eastern")
            echo "America/Toronto"
            ;;
        "Canada/Mountain")
            echo "America/Edmonton"
            ;;
        "Canada/Newfoundland")
            echo "America/St_Johns"
            ;;
        "Canada/Pacific")
            echo "America/Vancouver"
            ;;
        "Canada/Saskatchewan")
            echo "America/Regina"
            ;;
        "Canada/Yukon")
            echo "America/Whitehorse"
            ;;
        "Chile/Continental")
            echo "America/Santiago"
            ;;
        "Chile/EasterIsland")
            echo "Pacific/Easter"
            ;;
        "Cuba")
            echo "America/Havana"
            ;;
        "Enderbury")
            echo "Pacific/Kanton"
            ;;
        "Egypt")
            echo "Africa/Cairo"
            ;;
        "Eire")
            echo "Europe/Dublin"
            ;;
        "Europe/Kiev")
            echo "Europe/Kyiv"
            ;;
        "Europe/Uzhgorod")
            echo "Europe/Kyiv"
            ;;
        "Europe/Zaporozhye")
            echo "Europe/Kyiv"
            ;;
        "GB")
            echo "Europe/London"
            ;;
        "GB-Eire")
            echo "Europe/London"
            ;;
        "GMT")
            echo "Etc/GMT"
            ;;
        "GMT0")
            echo "Etc/GMT0"
            ;;
        "GMT-0")
            echo "Etc/GMT-0"
            ;;
        "GMT+0")
            echo "Etc/GMT+0"
            ;;
        "Greenwich")
            echo "Etc/Greenwich"
            ;;
        "Hongkong")
            echo "Asia/Hong_Kong"
            ;;
        "Iceland")
            echo "Atlantic/Reykjavik"
            ;;
        "Iran")
            echo "Asia/Tehran"
            ;;
        "Israel")
            echo "Asia/Tel_Aviv"
            ;;
        "Jamaica")
            echo "America/Jamaica"
            ;;
        "Japan")
            echo "Asia/Tokyo"
            ;;
        "Kwajalein")
            echo "Pacific/Kwajalein"
            ;;
        "Libya")
            echo "Africa/Tripoli"
            ;;
        "Mexico/BajaNorte")
            echo "America/Tijuana"
            ;;
        "Mexico/BajaSur")
            echo "America/Mazatlan"
            ;;
        "Mexico/General")
            echo "America/Mexico_City"
            ;;
        "Mideast/Riyadh87")
            echo "Asia/Riyadh"
            ;;
        "Mideast/Riyadh88")
            echo "Asia/Riyadh"
            ;;
        "Mideast/Riyadh89")
            echo "Asia/Riyadh"
            ;;
        "Navajo")
            echo "America/Denver"
            ;;
        "NZ")
            echo "Pacific/Auckland"
            ;;
        "NZ-CHAT")
            echo "Pacific/Chatham"
            ;;
        "Pacific/Enderbury")
            echo "Pacific/Kanton"
            ;;
        "Poland")
            echo "Europe/Warsaw"
            ;;
        "Portugal")
            echo "Europe/Lisbon"
            ;;
        "PRC")
            echo "Asia/Shanghai"
            ;;
        "ROC")
            echo "Asia/Taipei"
            ;;
        "ROK")
            echo "Asia/Seoul"
            ;;
        "Singapore")
            echo "Asia/Singapore"
            ;;
        "SystemV/AST4ADT")
            echo "America/Halifax"
            ;;
        "SystemV/EST5EDT")
            echo "America/New_York"
            ;;
        "SystemV/CST6CDT")
            echo "America/Chicago"
            ;;
        "SystemV/MST7MDT")
            echo "America/Denver"
            ;;
        "SystemV/PST8PDT")
            echo "America/Los_Angeles"
            ;;
        "SystemV/YST9YDT")
            echo "America/Anchorage"
            ;;
        "SystemV/AST4")
            echo "America/Puerto_Rico"
            ;;
        "SystemV/EST5")
            echo "America/Indiana/Indianapolis"
            ;;
        "SystemV/CST6")
            echo "America/Regina"
            ;;
        "SystemV/MST7")
            echo "America/Phoenix"
            ;;
        "SystemV/PST8")
            echo "Pacific/Pitcairn"
            ;;
        "SystemV/YST9")
            echo "Pacific/Gambier"
            ;;
        "SystemV/HST10")
            echo "Pacific/Honolulu"
            ;;
        "Turkey")
            echo "Europe/Istanbul"
            ;;
        "UCT")
            echo "Etc/UCT"
            ;;
        "Universal")
            echo "Etc/UTC"
            ;;
        "US/Alaska")
            echo "America/Anchorage"
            ;;
        "US/Aleutian")
            echo "America/Adak"
            ;;
        "US/Arizona")
            echo "America/Phoenix"
            ;;
        "US/Central")
            echo "America/Chicago"
            ;;
        "US/East-Indiana")
            echo "America/Indiana/Indianapolis"
            ;;
        "US/Eastern")
            echo "America/New_York"
            ;;
        "US/Hawaii")
            echo "Pacific/Honolulu"
            ;;
        "US/Indiana-Starke")
            echo "America/Indiana/Knox"
            ;;
        "US/Michigan")
            echo "America/Detroit"
            ;;
        "US/Mountain")
            echo "America/Denver"
            ;;
        "US/Pacific")
            echo "America/Los_Angeles"
            ;;
        "US/Samoa")
            echo "Pacific/Pago_Pago"
            ;;
        "UTC")
            echo "Etc/UTC"
            ;;
        "W-SU")
            echo "Europe/Moscow"
            ;;
        "Zulu")
            echo "Etc/UTC"
            ;;
        *)
            echo "$1"
            ;;
    esac
}

# If /etc/localtime is a link, update /etc/timezone
if [ -L /etc/localtime ] ; then
    TIMEZONE="$(readlink /etc/localtime)"
    TIMEZONE="${TIMEZONE#/usr/share/zoneinfo/}"
    if [ -f "/usr/share/zoneinfo/$TIMEZONE" ] ; then
        echo ${TIMEZONE} > /etc/timezone
    fi
fi

# Read /etc/timezone
if [ -e /etc/timezone ]; then
    TIMEZONE="$(head -n 1 /etc/timezone)"
    TIMEZONE="${TIMEZONE%% *}"
    TIMEZONE="${TIMEZONE##/}"
    TIMEZONE="${TIMEZONE%%/}"
    TIMEZONE="$(convert_timezone $TIMEZONE)"
    if [ -f "/usr/share/zoneinfo/$TIMEZONE" ] ; then
        case "$TIMEZONE" in
        CET | CST6CDT | EET | EST | EST5EDT | HST | MET | MST | MST7MDT | PST8PDT | WET)
            AREA=Legacy
            ZONE="$TIMEZONE"
            ;;
        *)
            AREA="${TIMEZONE%%/*}"
            ZONE="${TIMEZONE#*/}"
            ;;
        esac
    else
        rm -f /etc/timezone
    fi
fi

# The timezone is already configured
if [ -e /etc/timezone ] && [ -e /etc/localtime ] ; then
    # Don't ask the user, except if he/she explicitely asked that
    if [ -z "$DEBCONF_RECONFIGURE" ] ; then
        db_fset tzdata/Areas seen true
        db_fset tzdata/Zones/$AREA seen true
    fi
# The timezone has never been configured or is falsely configured
elif ! [ -e /etc/localtime ] || [ -n "$DEBCONF_RECONFIGURE" ] ; then
    if [ -z "$AREA" ] || [ -z "$ZONE" ] ; then
        RET=""
        db_get tzdata/Areas || true
        if [ -n "$RET" ] ; then
            AREA=$RET
        else
            AREA="Etc"
        fi

        RET=""
        db_get tzdata/Zones/$AREA || RET=true
        if [ -n "$RET" ] ; then
            ZONE=$RET
        else
            ZONE="UTC"
        fi

        echo "$AREA/$ZONE" > /etc/timezone
    fi
    db_fset tzdata/Areas seen false
    db_fset tzdata/Zones/$AREA seen false
# The user want to handle the timezone by him/herself
else
    exit 0
fi

# Initializes debconf default values from the ones found in
# configuration files
db_set tzdata/Areas "$AREA"
db_set tzdata/Zones/$AREA "$ZONE"

STATE=1
while [ "$STATE" -ge 0 ]; do
    case "$STATE" in
    0)
    	# The user has cancel the timezone change, reset the debconf
        # values to the initial one.
        db_set tzdata/Areas "$AREA"
        db_set tzdata/Zones/$AREA "$ZONE"
        break
        ;;
    1)
        # Ask the user of the Area
        db_input high tzdata/Areas || true
        ;;
    2)
        # Ask the user of the Zone
        db_get tzdata/Areas || RET=Etc
        db_input high tzdata/Zones/$RET || true
        ;;
    *)
        break
        ;;
    esac
    if db_go; then
        STATE=$(($STATE + 1))
    else
        STATE=$(($STATE - 1))
    fi
done




exit 0
Hacker Blog, Shell İndir, Sql İnjection, XSS Attacks, LFI Attacks, Social Hacking, Exploit Bot, Proxy Tools, Web Shell, PHP Shell, Alfa Shell İndir, Hacking Training Set, DDoS Script, Denial Of Service, Botnet, RFI Attacks, Encryption
Telegram @BIBIL_0DAY