Open nshalman opened 7 years ago
That seems quite doable although I would lean towards implement it as:
losetup -a | awk -d: '/genesis/bootcd/genesis.iso {print $1}' | xargs -r -n 1 losetup -d
I've added a commit to #72 that moves the cleanup logic to create-image.sh
(and calls losetup
directly from awk
, removing the need for xargs
as well)
The build process (sometimes??) leaves dangling /dev/loopN devices. My Makefile contains shenanigans for cleaning those up which are relatively simple under Linux. I imagine that on a Mac, the Docker Linux VM could get cluttered up in a way that is even harder to clean up.
It would be better if the build process just cleaned up after itself.
I think the culprit is the
livecd-iso-to-pxeboot
tool. Assuming that it won't be fixed any time soon, it is possible that after create-image.sh#L78 we could add:losetup -a | grep /genesis/bootcd/genesis.iso | cut -d: -f1 | xargs -r -n 1 losetup -d
Further testing of this idea is needed.