From 21ab5a714f2dfb6969e7ceefacef2f5a75b39102 Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Sun, 22 Jul 2018 13:51:41 +0200 Subject: [PATCH 1/3] [fix] set up locals to avoid perl warnings --- install_yunohost | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/install_yunohost b/install_yunohost index 7d60371..03a3b7d 100755 --- a/install_yunohost +++ b/install_yunohost @@ -110,6 +110,8 @@ function main() reboot fi + step fix_locals + step post_install || die "Post-installation failed" info "Installation logs are available in $YUNOHOST_LOG" @@ -402,6 +404,12 @@ function restart_services() { return 0 } +function fix_locals() { + [ "$(grep LC_ALL /etc/environment)" ] || echo 'LC_ALL="en_US.UTF-8"' >> /etc/environment + source /etc/environment + export LC_ALL +} + function post_install() { # No postinstall in auto mode [[ "$AUTOMODE" == "1" ]] && return 0 From d97ea92facd3f2a60a340599a91256016d651b41 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 22 Jul 2018 13:55:15 +0200 Subject: [PATCH 2/3] Typo --- install_yunohost | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install_yunohost b/install_yunohost index 03a3b7d..bed7795 100755 --- a/install_yunohost +++ b/install_yunohost @@ -110,7 +110,7 @@ function main() reboot fi - step fix_locals + step fix_locales step post_install || die "Post-installation failed" @@ -404,7 +404,7 @@ function restart_services() { return 0 } -function fix_locals() { +function fix_locales() { [ "$(grep LC_ALL /etc/environment)" ] || echo 'LC_ALL="en_US.UTF-8"' >> /etc/environment source /etc/environment export LC_ALL From 1c7a23cb4f58d3297391f2454d14a586d05ffae9 Mon Sep 17 00:00:00 2001 From: Laurent Peuch Date: Sun, 22 Jul 2018 14:23:49 +0200 Subject: [PATCH 3/3] [fix] apt will raised those errors on bad local, do this before --- install_yunohost | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/install_yunohost b/install_yunohost index bed7795..4b87f81 100755 --- a/install_yunohost +++ b/install_yunohost @@ -90,6 +90,7 @@ function main() step install_script_dependencies || die "Unable to install dependencies to install script" step create_custom_config || die "Creating custom configuration file /etc/yunohost/yunohost.conf failed" step confirm_installation || die "Installation cancelled at your request" + step fix_locales # do not die for a failure here, it's minor step setup_package_source || die "Setting up deb package sources failed" step apt_update || die "Error caught during 'apt-get update'" step register_debconf || die "Unable to insert new values into debconf database" @@ -110,8 +111,6 @@ function main() reboot fi - step fix_locales - step post_install || die "Post-installation failed" info "Installation logs are available in $YUNOHOST_LOG"