Skip to content
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

cancelling with CTRL+C need to be followed by umount /run/bees/mnt/$UUID #281

Open
tlaurion opened this issue Apr 15, 2024 · 3 comments
Open

Comments

@tlaurion
Copy link

btw. I just tried the current beesd script and starting like beesd ..: After cancelling with CTRL+C I always need to umount /run/bees/mnt/bab5... for the next run. Is that intended?

Originally posted by @Massimo-B in #54 (comment)

Confirmed on 1245072 from 9 months ago

@tlaurion
Copy link
Author

tlaurion commented Jun 14, 2024

@Zygo would be nice if bees was fixing itself on die

@Zygo
Copy link
Owner

Zygo commented Jun 14, 2024

Putting this at the beginning of beesd should work:

#!/bin/sh

if [ -z "$UNSHARE_DONE" ]; then
        UNSHARE_DONE=true
        export UNSHARE_DONE
        exec unshare -m --propagation private -- "$0" "$@"
fi

The drawback is that this duplicates the systemd namespacing, and requires the namespace privilege in the script to work. Maybe some additional checks to see if it's running under systemd and skip the extra unshare call?

@Massimo-B
Copy link

Massimo-B commented Jun 27, 2024

Hi, is this going to be fixed in the release?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants