[3.x][feature-request] To support the Ubuntu Pro enabling
Bug #2064557 reported by
Laider Lai
This bug affects 1 person
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| Ubuntu Image |
New
|
Wishlist
|
Unassigned | ||
Bug Description
Customers may need to build an Ubuntu image which is enabled with the Ubuntu Pro by default.
However, Ubuntu Image 3.x does not yet support to do this.
Even though we try to call a script by manual execution function for enabling Ubuntu Pro by some "pro" commands.
But the "pro" command requires some resources from /dev which does not conform under the manual stage.
For example, "pro" command complains "No such file or directory: '/proc/cpuinfo | meminfo | mounts'"
and failed to "systemctl start ua-timer.timer"
Does Ubuntu image 3.x support to enable Ubuntu Pro under a suitable stage? Tks.
| Changed in ubuntu-image: | |
| importance: | Undecided → Wishlist |
To post a comment you must log in.
Currently, we handle a post-script to enable Ubuntu Pro after the ubuntu-image is finished to output the target image.
In post-script, it mounts some resources from the host, then chroot to call "proc" commands for enabling.
1. mount --bind /dev dev/
2. mount --bind /proc proc/
3. chroot . /bin/sh -c "pro --debug attach --no-auto-enable ${PRO_TOKEN}"
4. chroot . /bin/sh -c "pro --debug enable --assume-yes ${FUNCTION}"
5. chroot . /bin/sh -c "pro --debug detach --assume-yes"
6. umount proc/
7. umount dev/