summaryrefslogtreecommitdiff
path: root/configs/releng/root-image/etc/rc.d/functions.d/prepare_locale_gen
blob: 47ed79d71c4fd6c9dac9e1abbae2d96af65694ae (plain)
1
2
3
4
5
6
7
8
9
10
11
prepare_locale_gen ()
{
    if [[ ${LOCALE} != "en_US.UTF-8" ]]; then
        stat_busy "Generating locales..."
            sed -i "s/#\(${LOCALE/[@.]*}\)/\1/" /etc/locale.gen
            /usr/sbin/locale-gen > /dev/null
        stat_done
    fi
}

add_hook sysinit_postmount prepare_locale_gen