Merge ~mvo/ubuntu-core-initramfs:the-modeenv into ~canonical-foundations/ubuntu-core-initramfs:master

Proposed by Michael Vogt
Status: Merged
Merged at revision: b881b0e1266b71034650e279e83c5d3018ec8d4f
Proposed branch: ~mvo/ubuntu-core-initramfs:the-modeenv
Merge into: ~canonical-foundations/ubuntu-core-initramfs:master
Diff against target: 28 lines (+5/-2)
2 files modified
factory/usr/lib/the-modeenv (+1/-1)
factory/usr/lib/the-tool (+4/-1)
Reviewer Review Type Date Requested Status
Canonical Foundations Team Pending
Review via email: mp+376764@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/factory/usr/lib/the-modeenv b/factory/usr/lib/the-modeenv
2index 1619eac..a9a1532 100755
3--- a/factory/usr/lib/the-modeenv
4+++ b/factory/usr/lib/the-modeenv
5@@ -1,6 +1,6 @@
6 #!/bin/sh
7 o=/sysroot/writable/system-data/var/lib/snapd/modeenv
8 sed 's/.*snapd_recovery_mode=\([a-z]*\).*/mode=\1/' /proc/cmdline >> $o
9-sed 's/.*snapd_recovery_system=\([0-9]*\).*/recovery_system=\1/' /proc/cmdline >> $o
10+sed 's/.*snapd_recovery=\([0-9]*\).*/recovery_system=\1/' /proc/cmdline >> $o
11 mount -o bind /run/mnt/ubuntu-seed/EFI/ubuntu/ /sysroot/boot/grub
12 cp /run/mnt/ubuntu-seed/systems/*/grubenv /sysroot/boot/grub/
13diff --git a/factory/usr/lib/the-tool b/factory/usr/lib/the-tool
14index 9213b4d..7fbcdb9 100755
15--- a/factory/usr/lib/the-tool
16+++ b/factory/usr/lib/the-tool
17@@ -3,7 +3,10 @@ set -e
18 cmd="systemd-mount --no-block --no-pager --no-ask-password"
19 # Mount base
20 #$cmd /run/mnt/ubuntu-seed/snaps/core20_*.snap /run/mnt/base
21-$cmd /run/mnt/ubuntu-seed/snaps/core20_*.snap /sysroot -pBefore=initrd-cleanup.target -pLazyUnmount=true
22+# XXX: core20 can be under /snaps and /systems/$label/snaps
23+# XXX2: snap-bootstrap initramfs-mounts should handle this correctly
24+core20=$(find /run/mnt/ubuntu-seed/ -name "core20_*.snap")
25+$cmd $core20 /sysroot -pBefore=initrd-cleanup.target -pLazyUnmount=true
26 cp /run/systemd/transient/*.mount /etc/systemd/system
27 # Mount writable
28 #$cmd --type=tmpfs tmpfs /run/mnt/ubuntu-data

Subscribers

People subscribed via source and target branches