From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 10 03:34:50 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 1B9C0106566C for ; Fri, 10 Sep 2010 03:34:50 +0000 (UTC) (envelope-from atom@smasher.org) Received: from atom.smasher.org (atom.smasher.org [69.55.237.145]) by mx1.freebsd.org (Postfix) with SMTP id D84CB8FC22 for ; Fri, 10 Sep 2010 03:34:49 +0000 (UTC) Received: (qmail 55475 invoked by uid 1000); 10 Sep 2010 03:34:49 -0000 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Date: Fri, 10 Sep 2010 15:34:45 +1200 (NZST) From: Atom Smasher In-Reply-To: Message-ID: <1009101529500.2000@smasher> MIME-Version: 1.0 OpenPGP: id=0xB88D52E4D9F57808; algo=1 (RSA); size=4096; url=http://atom.smasher.org/pgp.txt References: To: Aryeh Friedman X-POM: The Moon is Waxing Crescent (5% of Full) X-Hashcash: 1:20:1009100334:aryeh.friedman@gmail.com::QeAKxPL9/O91pua9:000000000 0000000000000000000000006k2G X-Hashcash: 1:20:1009100334:freebsd-hackers@freebsd.org::fGKwi8nFuYMYRb0u:000000 0000000000000000000000009sUm Cc: freebsd-hackers@freebsd.org 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: Fri, 10 Sep 2010 03:34:50 -0000 On Thu, 9 Sep 2010, 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. ===================== what i would do... make an alias or function of "logout" and/or "exit" in the init file that's parsed when the shell starts. alias it to a script or assign it to a function that does what you need. if your shell supports logging out with ^D (or any other keybinding) then the details may be shell-specific, but the idea would be to either disable it, or bind it to the script. -- ...atom ________________________ http://atom.smasher.org/ 762A 3B98 A3C3 96C9 C6B7 582A B88D 52E4 D9F5 7808 ------------------------------------------------- "The reasonable man adapts himself to the world; the unreasonable one persists in trying to adapt the world to himself. Therefore all progress depends on the unreasonable man." -- George Bernard Shaw