[Bug 1987859] [NEW] sed command in auto install fails in certain circumstance

Matti Kaupenjohann 1987859 at bugs.launchpad.net
Fri Aug 26 15:56:18 UTC 2022


Public bug reported:

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/Late/load_autoinstall_data: {"sed -i -e '/^postmaster:.*/i\\'$'root": "root' /target/etc/aliases"} is not of type 'string', 'array'
```

>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.

** Affects: subiquity (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: auto-install

** Description changed:

  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:
  
- ```bash 
+ ```
  late-commands:
-   - sed -i '/^postmaster:.*/i root:           root' /target/etc/aliases
+   - sed -i '/^postmaster:.*/i root:           root' /target/etc/aliases
  ```
  
  I will get the following error:
  
- ```bash
+ ```
  finish: subiquity/Late/load_autoinstall_data: {"sed -i -e '/^postmaster:.*/i\\'$'root": "root' /target/etc/aliases"} is not of type 'string', 'array'
  ```
  
  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.

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to subiquity in Ubuntu.
https://bugs.launchpad.net/bugs/1987859

Title:
  sed command in auto install fails in certain circumstance

Status in subiquity package in Ubuntu:
  New

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/Late/load_autoinstall_data: {"sed -i -e '/^postmaster:.*/i\\'$'root": "root' /target/etc/aliases"} is not of type 'string', 'array'
  ```

  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.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/subiquity/+bug/1987859/+subscriptions




More information about the foundations-bugs mailing list