From 73529ea2b569ec56bb2591a22c3695f5d9abdcd1 Mon Sep 17 00:00:00 2001 From: amy Date: Mon, 24 Jan 2022 21:20:09 +0100 Subject: [PATCH] make locale stuff actually --- src/functions/locale.rs | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/functions/locale.rs b/src/functions/locale.rs index 716fefb..2001ee1 100755 --- a/src/functions/locale.rs +++ b/src/functions/locale.rs @@ -7,8 +7,8 @@ pub fn set_timezone(timezone: &str) { "ln", vec![ "-sf".to_string(), - format!("/usr/share/zoneinfo/{}", timezone), - "/etc/localtime".to_string(), + format!("/mnt/usr/share/zoneinfo/{}", timezone), + "/mnt/etc/localtime".to_string(), ], ), "Set timezone", @@ -21,29 +21,29 @@ pub fn set_timezone(timezone: &str) { pub fn set_locale(locale: String) { files_eval( - files::append_file("/etc/locale.gen", "en_US.UTF-8 UTF-8"), + files::append_file("/mnt/etc/locale.gen", "en_US.UTF-8 UTF-8"), "add en_US.UTF-8 UTF-8 to locale.gen", ); files_eval( - files::append_file("/etc/locale.gen", locale.as_str()), + files::append_file("/mnt/etc/locale.gen", locale.as_str()), "add locales to locale.gen", ); exec_eval( exec_chroot("locale-gen", vec!["".to_string()]), "generate locales", ); - files::create_file("/etc/locale.conf"); + files::create_file("/mnt/etc/locale.conf"); files_eval( - files::append_file("/etc/locale.conf", "LANG=en_US.UTF-8"), + files::append_file("/mnt/etc/locale.conf", "LANG=en_US.UTF-8"), "edit locale.conf", ); } pub fn set_keyboard(keyboard: &str) { - files::create_file("/etc/vconsole.conf"); + files::create_file("/mnt/etc/vconsole.conf"); files_eval( files::append_file( - "/etc/vconsole.conf", + "/mnt/etc/vconsole.conf", format!("KEYMAP={}", keyboard).as_str(), ), "set keyboard layout",