Date: Sat, 11 Sep 2010 12:07:39 +0300 From: Peter Pentchev <roam@ringlet.net> To: jhell <jhell@DataIX.net> Cc: freebsd-hackers@freebsd.org, Aryeh Friedman <aryeh.friedman@gmail.com> Subject: Re: How to disallow logout Message-ID: <20100911090739.GA3797@straylight.ringlet.net> In-Reply-To: <4C8AE9CB.9070008@DataIX.net> References: <AANLkTim4OG2124dVtEHFSR06c7sF-nnMA7bgfPApTywk@mail.gmail.com> <4C8AE7A2.1090802@DataIX.net> <4C8AE9CB.9070008@DataIX.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--GvXjxJ+pjyke8COw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Sep 10, 2010 at 10:30:35PM -0400, jhell wrote: > 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" > >=20 > > trap '/path/to/your_wrapper_script.HERE' 2 > >=20 >=20 > This should be: >=20 > trap '/path/to/script' EXIT >=20 > > 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. =2E..but, of course, that's only until people learn that they can bypass th= is by something like 'kill -FPE $$'. G'luck, Peter --=20 Peter Pentchev roam@space.bg roam@ringlet.net roam@FreeBSD.org PGP key: http://people.FreeBSD.org/~roam/roam.key.asc Key fingerprint FDBA FD79 C26F 3C51 C95E DF9E ED18 B68D 1619 4553 If wishes were fishes, the antecedent of this conditional would be true. --GvXjxJ+pjyke8COw Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAEBCgAGBQJMi0bOAAoJEGUe77AlJ98TlZgQALEt6CdZ0qAczCYq9+JuUtGu dDLeZrkjnpB7iVVKbqjtiQrfIKGEOhdxQKpDAKNj6Z7YUXzQyngJ8vzWBHGeaGHm DpBvJmE3sLctGEQ7ExZZocx4CID1umEwvL3siS7IdYN50IzXWoMJyBWUimhNnZRo KO/419q7MTluzYX+cRguMcp+0NV3jnlfQT611N5uESazjHoeMkOmM/kLaVQ2O2cE MDp7jRXG0UnmGz0kc+7qJuR36Z4cfutgXcw3qZZ6lNe4T8xnJlmCbawkLg/pV+pb 8pBK1iFgp2k6HX9Nr3EM/G4SzyeMtOSL3upHrYdsn25LdOJEFDFe6MGHyLGJahwi Z17pdXxhD7TW6cRvPuAvTM6eTlE4mTzaZrnv4tcjxQH05okoFlMwW51za+dWSkkH +mAzGBAxHcjBMxGH+jKQmmNgjl7zr/iJUT9mGJhu4a6s7YNm5KQ5CqCoUA8v8gWG iPHqPLk8XHArPqJS4GpCwiVSg9Li2a4RGftpBaxzg0R5UE9WeZBczIhMsGCSGquM IOzYF+ZMvI2wM14hJEPByqUi4Vav0uGqd4Pw2cz+s2m2vIXAirhck0e3p1bcdO3c 4+L0qz8HsSn7VEIj7szYt4pNZCLXQ1TKS6BCmJE/0wAVULSyv87tbqyIAZp+/cJt YmOvc2DPIbuCDi4l21EK =dZLP -----END PGP SIGNATURE----- --GvXjxJ+pjyke8COw--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100911090739.GA3797>