Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

Commit

Permalink
agent: support agent as init process in rootfs images
Browse files Browse the repository at this point in the history
Don't fail if `dev` is already mounted.

fixes #264

Signed-off-by: Julio Montes <[email protected]>
  • Loading branch information
Julio Montes committed Sep 20, 2018
1 parent fd28fe4 commit 54f77cf
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,11 @@ func mountToRootfs(m initMount) error {
func generalMount() error {
for _, m := range initRootfsMounts {
if err := mountToRootfs(m); err != nil {
return err
// dev is already mounted if the rootfs image is used
if m.src != "dev" {
return err
}
agentLog.WithError(err).WithField("src", m.src).Warnf("Could not mount filesystem")
}
}
return nil
Expand Down

0 comments on commit 54f77cf

Please sign in to comment.