From owner-freebsd-hackers@FreeBSD.ORG Sat Sep 11 09:36:52 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B7D5F1065674 for ; Sat, 11 Sep 2010 09:36:52 +0000 (UTC) (envelope-from roam@ringlet.net) Received: from erengrad.hoster.bg (erengrad.hoster.bg [77.77.142.9]) by mx1.freebsd.org (Postfix) with ESMTP id 347F88FC13 for ; Sat, 11 Sep 2010 09:36:51 +0000 (UTC) Received: from middenheim.hoster.bg (middenheim.hoster.bg [77.77.142.11]) by erengrad.hoster.bg (Postfix) with ESMTP id 4A2B7DC1E0 for ; Sat, 11 Sep 2010 12:07:57 +0300 (EEST) Received: from straylight.ringlet.net (unknown [94.155.53.142]) (Authenticated sender: roam@hoster.bg) by mail.hoster.bg (Postfix) with ESMTP id D05BE5C37E for ; Sat, 11 Sep 2010 12:07:39 +0300 (EEST) Received: from roam (uid 1000) (envelope-from roam@ringlet.net) id 4160bd by straylight.ringlet.net (DragonFly Mail Agent) Sat, 11 Sep 2010 12:07:39 +0300 Date: Sat, 11 Sep 2010 12:07:39 +0300 From: Peter Pentchev To: jhell Message-ID: <20100911090739.GA3797@straylight.ringlet.net> Mail-Followup-To: jhell , Aryeh Friedman , freebsd-hackers@freebsd.org References: <4C8AE7A2.1090802@DataIX.net> <4C8AE9CB.9070008@DataIX.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="GvXjxJ+pjyke8COw" Content-Disposition: inline In-Reply-To: <4C8AE9CB.9070008@DataIX.net> User-Agent: Mutt/1.5.20 (2009-06-14) X-MailScanner-ID: D05BE5C37E.C73ED X-hoster-MailScanner: Found to be clean X-hoster-MailScanner-SpamCheck: not spam, SpamAssassin (cached, score=0.001, required 10, autolearn=disabled, UNPARSEABLE_RELAY 0.00) X-hoster-MailScanner-From: roam@ringlet.net X-hoster-MailScanner-To: freebsd-hackers@freebsd.org X-Spam-Status: No Cc: freebsd-hackers@freebsd.org, Aryeh Friedman Subject: Re: How to disallow logout X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Sep 2010 09:36:52 -0000 --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--