envkernel: Fix switching envkernel to different source path (!1733)
When there is already another kernel source path mounted then the old mount should be removed. Otherwise the mount source will still be pointed at the old kernel source.
This commit is contained in:
parent
3e845e1edf
commit
70126570a4
|
@ -128,7 +128,9 @@ initialize_chroot() {
|
|||
|
||||
|
||||
mount_kernel_source() {
|
||||
[ -e "$chroot/mnt/linux/Kbuild" ] && return
|
||||
if [ -e "$chroot/mnt/linux/Kbuild" ]; then
|
||||
sudo umount "$chroot/mnt/linux"
|
||||
fi
|
||||
sudo mount --bind "$PWD" "$chroot/mnt/linux"
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue