mirror of
https://github.com/kairos-io/immucore.git
synced 2025-08-12 03:22:27 +00:00
Translate persistent to runtime device
Signed-off-by: Itxaka <itxaka@spectrocloud.com>
This commit is contained in:
parent
c2deb76192
commit
b628f959d3
@ -203,9 +203,6 @@ func (s *State) Register(g *herd.Graph) error {
|
|||||||
// TODO: add hooks, fstab (might have missed some), systemd compat
|
// TODO: add hooks, fstab (might have missed some), systemd compat
|
||||||
// TODO: We should also set tmpfs here (not -related)
|
// TODO: We should also set tmpfs here (not -related)
|
||||||
|
|
||||||
// symlink
|
|
||||||
// execute the rootfs hook
|
|
||||||
|
|
||||||
// All of this below need to run after rootfs stage runs (so the layout file is created)
|
// All of this below need to run after rootfs stage runs (so the layout file is created)
|
||||||
// This is legacy - in UKI we don't need to found the img, this needs to run in a conditional
|
// This is legacy - in UKI we don't need to found the img, this needs to run in a conditional
|
||||||
if s.MountRoot {
|
if s.MountRoot {
|
||||||
@ -396,12 +393,16 @@ func (s *State) Register(g *herd.Graph) error {
|
|||||||
herd.WithCallback(func(ctx context.Context) error {
|
herd.WithCallback(func(ctx context.Context) error {
|
||||||
var err error
|
var err error
|
||||||
|
|
||||||
for id, mountpoint := range s.CustomMounts {
|
for what, where := range s.CustomMounts {
|
||||||
s.Logger.Debug().Str("what", id).Str("where", s.path(mountpoint)).Msg("mounting custom mounts")
|
// Translate label to disk for COS_PERSISTENT
|
||||||
|
if what == "/dev/disk/by-label/COS_PERSISTENT" {
|
||||||
|
what = runtime.Persistent.Name
|
||||||
|
}
|
||||||
|
s.Logger.Debug().Str("what", what).Str("where", s.path(where)).Msg("mounting custom mounts")
|
||||||
|
|
||||||
err = multierror.Append(err, s.MountOP(
|
err = multierror.Append(err, s.MountOP(
|
||||||
id,
|
what,
|
||||||
s.path(mountpoint),
|
s.path(where),
|
||||||
"auto",
|
"auto",
|
||||||
[]string{
|
[]string{
|
||||||
"ro", // or rw
|
"ro", // or rw
|
||||||
|
Loading…
Reference in New Issue
Block a user