Closed vekexasia closed 7 years ago
Yes, I intended to re-visit this part of the code since long now and complete the set of calls as well document them properly. So thanks for bringing up the issue. I suggest we have 4 callbacks:
pre-open()
post-open()
pre-close()
post-close()
Anything else?
Hello, not actually. I think we might have everything we need with those hooks.
(no pressure) when do you think you might be able to implement these hooks?
Started branch exec-hooks here https://github.com/dyne/Tomb/commit/056d0174f496b47925baf349b92877263801cdfd Let me know what do you think. This may break existing post-hooks scripts, hence renaming the hooks file its necessary to avoid undesired consequences.
WoW that was fast. looks good to me. We just need to update the Wiki and that's it?
You can use the branch assuming it won't change much. I'll wait for people to notice this and review it. It may still benefit from some new test units to cover the case.
What do you think about watching exit code and avoid proceeding if an error occurred in the process?
A sample use case would be forcing the backup in pre-close hook using an alternative crypto solution such as tar + gpg & backup it to an external USB drive that must be attached.
good idea, applicable only in case of pre-*
functions.
but not in pre-open: I was spacing out :^) if not open, there is no hook file :^D
I was wondering indeed how you could manage the pre-open hook.
but it could be helpful in pre-close hook for the use case mentioned above :)
yep, its implemented (simply as open
or close
) always in the exec-hooks branch. let me know about your experience and if you manage to implement your usecase.
ping. shall we merge this branch then? I see no blockers.
yup :)
On Sat, Jun 10, 2017 at 11:18 AM, Jaromil notifications@github.com wrote:
ping. shall we merge this branch then? I see no blockers.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dyne/Tomb/issues/265#issuecomment-307553417, or mute the thread https://github.com/notifications/unsubscribe-auth/AAMPSxDfRFTnMtQ8JCSteakc3R4zelUqks5sCl9vgaJpZM4NxGLm .
--
Andrea Baccega [image: Email]me@andreabaccega.com [image: Hangouts]vekexasia@gmail.com [image: Personal site] http://www.andreabaccega.com/ [image: Linkedin Profile] http://it.linkedin.com/in/andreabaccega [image: Facebook] https://www.facebook.com/andrea.baccega [image: Google+] https://plus.google.com/109217393200753135791 [image: Twitter] http://twitter.com/veke87 [image: StackOverflow] http://stackoverflow.com/users/314407/andrea-baccega [image: GitHub] https://github.com/vekexasia
It would be nice to have a way to specify a pre-close hooks so that we can perform clean ups of other sort or perform backups.