bind /boot if mounted
This commit is contained in:
parent
9b87210b89
commit
1f022d9fba
@ -1,8 +1,8 @@
|
||||
# ------------------------------------------------------------------------
|
||||
from mcluseau/golang-builder:1.14.0 as build
|
||||
from mcluseau/golang-builder:1.15.5 as build
|
||||
|
||||
# ------------------------------------------------------------------------
|
||||
from alpine:3.11.3
|
||||
from alpine:3.12
|
||||
|
||||
env busybox_v=1.28.1-defconfig-multiarch \
|
||||
arch=x86_64
|
||||
|
8
main.go
8
main.go
@ -138,12 +138,16 @@ func main() {
|
||||
mount("overlay", "/system", "overlay", rootMountFlags,
|
||||
"lowerdir="+strings.Join(lowers, ":")+",upperdir=/changes/upperdir,workdir=/changes/workdir")
|
||||
|
||||
// mount("/boot", "/system/boot", "", syscall.MS_BIND, "")
|
||||
if layersInMemory && bootMounted {
|
||||
if bootMounted {
|
||||
if layersInMemory {
|
||||
if err := syscall.Unmount("/boot", 0); err != nil {
|
||||
log.Print("WARNING: failed to unmount /boot: ", err)
|
||||
time.Sleep(2 * time.Second)
|
||||
}
|
||||
|
||||
} else {
|
||||
mount("/boot", "/system/boot", "", syscall.MS_BIND, "")
|
||||
}
|
||||
}
|
||||
|
||||
// - write configuration
|
||||
|
Loading…
Reference in New Issue
Block a user