kisslinux / kiss

KISS Linux - Package Manager
https://kisslinux.github.io
MIT License
464 stars 62 forks source link

kiss-chroot: avoid clobbering resolv.conf and continue cleanup even if umount fails #286

Closed TAAPArthur closed 2 years ago

TAAPArthur commented 2 years ago

This PR contains the following fixes for kiss-chroot kiss-chroot: avoid clobbering resolv.conf

Instead of forcibly overriding the target's resolv.conf, just bind mount
over it. resolv.conf doesn't have to be dynamically generated so the
previous behavior is dangerous.

And

kiss-chroot: continue cleanup even if umount fails

Not every specified directory may have been mounted and in such a case
umount will fail to unmount the dir. Previously this would lead to the
cleanup code existing prematurely and leaving some paths still mounted.
Now these errors are silently ignored.
dylanaraps commented 2 years ago

Made these changes, thanks.