Date: Fri, 10 Sep 2010 22:30:35 -0400 From: jhell <jhell@DataIX.net> To: Aryeh Friedman <aryeh.friedman@gmail.com> Cc: freebsd-hackers@freebsd.org Subject: Re: How to disallow logout Message-ID: <4C8AE9CB.9070008@DataIX.net> In-Reply-To: <4C8AE7A2.1090802@DataIX.net> References: <AANLkTim4OG2124dVtEHFSR06c7sF-nnMA7bgfPApTywk@mail.gmail.com> <4C8AE7A2.1090802@DataIX.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On 09/10/2010 22:21, jhell wrote: > On 09/09/2010 23:27, Aryeh Friedman wrote: >> I have a directory that must not exist on logout and rm -rf is not >> sufficent to do it because the contents need to be processed by our >> version control system. The real life scenario is our version >> control system stores the repo for a given project encrypted but for >> techinical reasons it needs to keep the checkouted files in plain text >> (they are all in the same dir) and I want to *NEVER* have the plain >> text checkouted files in my dir when I logout, *BUT* instead of just >> deleting it I need to check them in... so how do I make my .logout so >> if the file exists it will not exit and give a error saying that dir >> is still there? (minor but unimportant side effect of the version >> control system is the dir will have a different name everytime it is >> made but always the same prefix) >> _______________________________________________ >> freebsd-hackers@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-hackers >> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > > trap '/path/to/your_wrapper_script.HERE' 2 > This should be: trap '/path/to/script' EXIT > Should execute the contents of that script on every logout. Whether that > script is a line by line action or a fully qualified script with > functions to call different actions are up to you. > > Good luck, > -- jhell,v
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C8AE9CB.9070008>