summaryrefslogtreecommitdiff
path: root/hscript/script_e.cc
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2023-12-01 21:39:58 -0600
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2023-12-01 21:47:21 -0600
commit36dc1b7a2ea44321a2c233fd7ea576ed516d4ccc (patch)
tree323d215d395f5e7b276f7fe267d9952e884cce69 /hscript/script_e.cc
parent8e5abd31f932c51a1f153e02d769eaebd6a2a543 (diff)
downloadhorizon-36dc1b7a2ea44321a2c233fd7ea576ed516d4ccc.tar.gz
horizon-36dc1b7a2ea44321a2c233fd7ea576ed516d4ccc.tar.bz2
horizon-36dc1b7a2ea44321a2c233fd7ea576ed516d4ccc.tar.xz
horizon-36dc1b7a2ea44321a2c233fd7ea576ed516d4ccc.zip
Add 'rootshell' key to determine root's shell
* Key added to code and documentation. * Tests added and pass locally on gwyn (ppc64) and fran (aarch64). * Qt UI automatically sets /bin/zsh as root's shell (ref: packages#206). * ISO image creator backend no longer has root shell hack.
Diffstat (limited to 'hscript/script_e.cc')
-rw-r--r--hscript/script_e.cc12
1 files changed, 10 insertions, 2 deletions
diff --git a/hscript/script_e.cc b/hscript/script_e.cc
index 50f92e1..738bfed 100644
--- a/hscript/script_e.cc
+++ b/hscript/script_e.cc
@@ -647,8 +647,12 @@ 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);
+#ifdef HAS_INSTALL_ENV
+ if(!opts.test(Simulate)) {
+ fs::create_symlink("/etc/init.d/keymaps",
+ targ_etc + "/runlevels/default/keymaps", ec);
+ }
+#endif /* HAS_INSTALL_ENV */
}
for(auto &acct : internal->accounts) {
@@ -697,6 +701,10 @@ bool Script::execute() const {
}
#endif
+ if(internal->root_shell) {
+ EXECUTE_OR_FAIL("rootshell", internal->root_shell)
+ }
+
if(internal->boot) {
EXECUTE_OR_FAIL("bootloader", internal->boot)
}