sed command in auto install fails in certain circumstance
Bug #1987859 reported by
Matti Kaupenjohann
This bug affects 2 people
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| subiquity (Ubuntu) |
Expired
|
Undecided
|
Unassigned | ||
Bug Description
If I want to insert or append a line in the `/etc/aliases` file in the section `late-commands` from ubuntu auto-install, like the follwoing:
```
late-commands:
- sed -i '/^postmaster:.*/i root: root' /target/etc/aliases
```
I will get the following error:
```
finish: subiquity/
```
From the the double quotes it seems, instead of running the complete command, the part in front of the colon will be interpreted as key. In this scenario the key:value regex seems to completly negate the single quotes of the `sed` command.
| description: | updated |
| Changed in subiquity (Ubuntu): | |
| status: | New → Incomplete |
To post a comment you must log in.

This is just YAML being bad I think? Either of the following should work:
late-commands:
- |
sed -i '/^postmaster:.*/i root: root' /target/etc/aliases
- - sed
- -i
- "/^postmaster:.*/i root: root"
- /target/etc/aliases