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

Support mount and unmount commands #11

Open
wants to merge 4 commits into
base: version1.4-beta
Choose a base branch
from

Conversation

makadaw
Copy link

@makadaw makadaw commented Oct 1, 2017

Basic implementation of mount and unmount command to hide usage of hdiutil inside mactomb.

Please notice me for any questions

@davinerd
Copy link
Owner

Sorry for the delay @makadaw .
I'll test the PR in the next days and will let you know.

Really appreciated!

Regards

@davinerd
Copy link
Owner

@makadaw your PR works well but it breaks the 'rename' function.

Do you have time to fix it as well?

I'd like to merge your code into MacTomb 1.4. You can checkout the branch 'version1.4-beta' and working on it.

Does it make sense?
If not, I can copy-paste your code into that branch and then publish (after the 'rename' fix) but I'll have to reject this PR.

Let me know which solution works better for you.

Thank you,
Regards

@makadaw
Copy link
Author

makadaw commented Oct 15, 2017

@davinerd I can check it.
I will change base branch to 1.4beta

@makadaw makadaw changed the base branch from master to version1.4-beta October 15, 2017 17:40
@makadaw
Copy link
Author

makadaw commented Oct 15, 2017

Hey @davinerd,

I checked new branch and check rename function and looks like everything works well. Can you point me a problem?

@davinerd
Copy link
Owner

Sure:

~/MacTomb(support-mount-unmount-commands) » bash mactomb.sh mount -f ~/mytomb.dmg -m ~/mount_pt
Enter password to access "mytomb.dmg": 
[*] Mactomb /Users/user/mytomb.dmg was successfully mounted 

~/MacTomb(support-mount-unmount-commands) » bash mactomb.sh rename -f ~/mytomb.dmg -n "mynewlabel"
[*] Renaming to 'mynewlabel'
[x] Cannot rename '/Users/user/mytomb.dmg': hdiutil: attach failed - Resource busy

I think the issue is at https://github.com/davinerd/MacTomb/blob/version1.4-beta/mactomb.sh#L282
but didn't troubleshoot it.

Let me know if you're able to reproduce it.

@makadaw
Copy link
Author

makadaw commented Nov 8, 2017

Hi, sorry for long response ) Have too many things to do offline.
I checked this and I think this is not related to my changes. This is hdiutil behavior.

@davinerd
Copy link
Owner

No problem.

I've published v1.4. Will take a look at your code and try to marge in the next version 1.5.

Thanks!

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

Successfully merging this pull request may close these issues.

2 participants