-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mount/Umount fixes and improvements #778
Conversation
steps to test this please. |
Mount a file or folder into a jail, then unmount it. It should work. I was finding that at times it would enter the mount multiple times into the fstab file. So Also, this allows to mount files like so "bastille mount jail /etc/rc.conf mnt/etc.conf" or "bastille mount jail /etc/rc.conf /mnt/etc.conf" with or without the leading slash. This PR will trim make sure there are no // in the path. You can also mount bastille mount jail /etc/rc.conf mnt" and it will simply mount at /mnt/etc.rc.conf The old way had bugs like
|
tested working |
This PR fixes a bunch of bugs found in mount and umount, and adds the ability to mount files as well as directories.
It also included the "set_target" function, as well as a new "error_continue" function that is always called inside loops to continue to the next jail if an error occurs in the event of "ALL" as a target.
To test
Make sure that when you retry the mount/umount commands, that it returns the correct error saying that 1. it has been already mounted, 2. the mount doesn't exist
#737