diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2020-06-06 00:57:21 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2020-06-06 00:57:21 -0500 |
commit | 2a56c5e7d64fdac1c94c7bfd0df723a4dcb07354 (patch) | |
tree | 5a590cde3591a58546458c1fb52adfa0d0e3c2e1 | |
parent | 9f737dbab8b9ed9fa57bdf15542cc00a8363d98b (diff) | |
download | horizon-2a56c5e7d64fdac1c94c7bfd0df723a4dcb07354.tar.gz horizon-2a56c5e7d64fdac1c94c7bfd0df723a4dcb07354.tar.bz2 horizon-2a56c5e7d64fdac1c94c7bfd0df723a4dcb07354.tar.xz horizon-2a56c5e7d64fdac1c94c7bfd0df723a4dcb07354.zip |
hscript: Update for console-setup -> kbd change
-rw-r--r-- | hscript/meta.cc | 19 | ||||
-rw-r--r-- | hscript/script_e.cc | 2 | ||||
-rw-r--r-- | hscript/script_i.hh | 1 |
3 files changed, 10 insertions, 12 deletions
diff --git a/hscript/meta.cc b/hscript/meta.cc index ff39d4a..c3308d2 100644 --- a/hscript/meta.cc +++ b/hscript/meta.cc @@ -377,30 +377,25 @@ bool Keymap::validate() const { } bool Keymap::execute() const { - const std::string conf("# KEYBOARD CONFIGURATION FILE\n\ -\n\ -# Consult the keyboard(5) manual page.\n\ -\n\ -XKBMODEL=pc105\n\ -XKBLAYOUT=" + _value + "\n\ -XKBVARIANT=\n\ -XKBOPTIONS=\n\ -\n\ -BACKSPACE=guess" + const std::string conf("keymap=\"" + _value + "\"\n\ +windowkeys=\"NO\"\n\ +extended_keymaps=\"\"\n\ +dumpkeys_charset=\"\"\n\ +fix_euro=\"NO\"" ); output_info(pos, "keymap: setting system keyboard map to " + _value); if(script->options().test(Simulate)) { std::cout << "cat >" << script->targetDirectory() - << "/etc/default/keyboard <<-KEYCONF" << std::endl; + << "/etc/conf.d/keymaps <<-KEYCONF" << std::endl; std::cout << conf << std::endl; std::cout << "KEYCONF" << std::endl; return true; } #ifdef HAS_INSTALL_ENV - std::ofstream keyconf(script->targetDirectory() + "/etc/default/keyboard", + std::ofstream keyconf(script->targetDirectory() + "/etc/conf.d/keymaps", std::ios_base::trunc); if(!keyconf) { output_error(pos, "keymap: cannot write target keyboard configuration"); diff --git a/hscript/script_e.cc b/hscript/script_e.cc index a05d41e..a58338e 100644 --- a/hscript/script_e.cc +++ b/hscript/script_e.cc @@ -628,6 +628,8 @@ bool Script::execute() const { if(internal->keymap) { EXECUTE_OR_FAIL("keymap", internal->keymap) + fs::create_symlink("/etc/init.d/keymaps", + targ_etc + "/runlevels/default/keymaps", ec); } for(auto &acct : internal->accounts) { diff --git a/hscript/script_i.hh b/hscript/script_i.hh index b219579..c6dbb54 100644 --- a/hscript/script_i.hh +++ b/hscript/script_i.hh @@ -236,6 +236,7 @@ struct Script::ScriptPrivate { } std::unique_ptr<Keymap> k(dynamic_cast<Keymap *>(obj)); keymap = std::move(k); + packages.insert("kbd-keymaps"); return true; } |