diff options
| author | Greg Steuck <blackgnezdo@gmail.com> | 2021-01-28 23:04:10 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-28 23:04:10 -0800 |
| commit | 6593fd32d71a33f76462f347ef263e26600d998e (patch) | |
| tree | 6926379cb993aa1c811124e6be17f20f979d3045 /pkg/build/openbsd.go | |
| parent | 7df34f59bca2c74f1dfa5c198b94577cf918cbb2 (diff) | |
pkg/build/openbsd: sync before umount (#2414)
Reported-by: syzbot+badc83af4aac6e58c236@syzkaller.appspotmail.com
Diffstat (limited to 'pkg/build/openbsd.go')
| -rw-r--r-- | pkg/build/openbsd.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/pkg/build/openbsd.go b/pkg/build/openbsd.go index d09427849..a47579035 100644 --- a/pkg/build/openbsd.go +++ b/pkg/build/openbsd.go @@ -81,6 +81,7 @@ func (ctx openbsd) copyFilesToImage(overlayDir, outputDir string) error { script := fmt.Sprintf(`set -eux OVERLAY="%s" # Cleanup in case something failed before. +sync doas umount /altroot || true doas vnconfig -u vnd0 || true @@ -88,6 +89,7 @@ doas /sbin/vnconfig vnd0 image doas mount /dev/vnd0a /altroot doas cp kernel /altroot/bsd test -d "$OVERLAY" && doas cp -Rf "$OVERLAY"/. /altroot +sync doas umount /altroot doas vnconfig -u vnd0 `, overlayDir) |
