diff options
Diffstat (limited to 'cmd/earlyinit/mount.go')
| -rw-r--r-- | cmd/earlyinit/mount.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cmd/earlyinit/mount.go b/cmd/earlyinit/mount.go index 6ac59a46..51d4ecc9 100644 --- a/cmd/earlyinit/mount.go +++ b/cmd/earlyinit/mount.go @@ -12,6 +12,7 @@ import ( "hakurei.app/check" "hakurei.app/fhs" "hakurei.app/internal/kobject" + "hakurei.app/internal/uevent" ) // mustMountSystem waits for and mounts a system device matching pattern. @@ -26,8 +27,9 @@ func mustMountSystem( for { var matchErr error var systemPath *check.Absolute - s.Range(c, func(o *kobject.Object) bool { - if o.Subsystem != "block" || + s.Range(c, func(o *kobject.Object, act uevent.KobjectAction) bool { + if (act != uevent.KOBJ_ADD && act != uevent.KOBJ_CHANGE) || + o.Subsystem != "block" || o.Env["DEVTYPE"] != "disk" { return true } |
