Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall.py
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds+github@gmail.com>2019-11-29 16:53:47 +0100
committerAnton Hvornum <anton.feeds+github@gmail.com>2019-11-29 16:53:47 +0100
commitcefe7e4f8b714e2c5c1ea7b6153eff42fc051878 (patch)
tree669a562beb9645e8401b9e6b187267002543ad49 /archinstall.py
parent3769a3193b24ff77620f0160239058296dc495be (diff)
Enhancing trigger values
Diffstat (limited to 'archinstall.py')
-rw-r--r--archinstall.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/archinstall.py b/archinstall.py
index 39911742..07205096 100644
--- a/archinstall.py
+++ b/archinstall.py
@@ -317,7 +317,12 @@ class sys_command():#Thread):
broke = False
if 'events' in self.kwargs:
for trigger in list(self.kwargs['events']):
- if type(trigger) != bytes: trigger = bytes(trigger, 'UTF-8')
+ if type(trigger) != bytes:
+ key = self.kwargs['events'][trigger]
+ del(self.kwargs['events'][trigger])
+ trigger = bytes(key, 'UTF-8')
+ self.kwargs['events'][trigger] = self.kwargs['events'][key]
+
if trigger.lower() in self.trace_log[last_trigger_pos:].lower():
trigger_pos = self.trace_log[last_trigger_pos:].lower().find(trigger.lower())
@@ -325,6 +330,8 @@ class sys_command():#Thread):
log(f"Writing to subprocess {self.cmd[0]}: {self.kwargs['events'][trigger].decode('UTF-8')}", origin='spawn', level=5)
last_trigger_pos = trigger_pos
+ if type(self.kwargs['events'][trigger]) != bytes:
+ self.kwargs['events'][trigger] = bytes(self.kwargs['events'][trigger], 'UTF-8')
os.write(child_fd, self.kwargs['events'][trigger])
del(self.kwargs['events'][trigger])
broke = True
@@ -1117,7 +1124,7 @@ def run_post_install_steps(*positionals, **kwargs):
## [root@<hostname> ~]#
defaults = {
'login:' : 'root\n',
- #b'Password:' : bytes(args['password']+'\n',
+ #'Password:' : args['password']+'\n',
'[root@{args["hostname"]} ~]#' : command+'\n',
}
if not 'events' in opts: opts['events'] = {}