I use following command in my ubuntu auto-install late-commands
to append a line in my /etc/aliases
file:
sed -i -e '/^postmaster:.*/i\'$'root: root' /target/etc/aliases
I also tried POSIX not conform version:
sed -i '/^postmaster:.*/i root: root' /target/etc/aliases
Both with the same result while installing:
finish: subiquity/Late/load_autoinstall_data: {"sed -i -e '/^postmaster:.*/i\\'$'root": "root' /target/etc/aliases"} is not of type 'string', 'array'
I think I understand the issue: The Column-Space is interpreted by yaml or something else as yaml entry. At least this message leads in my opinion to this problem.
I thought since late-commands
are already multiline commands this would not be any issue.
I also tried using double quotes instead of single quotes.
Any Idea how to achieve the wanted behaviour?
Why do you think this? I didn't just used a single command. I've added a list of command with
– MaKaNu Aug 27 '22 at 09:34- <command1>\n - <commander2>
. I didn't know that nesting is still possible with this syntax.