From owner-freebsd-hackers@FreeBSD.ORG Sat Sep 11 02:30:40 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 02AB1106564A for ; Sat, 11 Sep 2010 02:30:40 +0000 (UTC) (envelope-from jhellenthal@gmail.com) Received: from mail-gw0-f54.google.com (mail-gw0-f54.google.com [74.125.83.54]) by mx1.freebsd.org (Postfix) with ESMTP id A04F88FC08 for ; Sat, 11 Sep 2010 02:30:39 +0000 (UTC) Received: by gwb15 with SMTP id 15so1336682gwb.13 for ; Fri, 10 Sep 2010 19:30:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=qBu1w9MXTucl1yDi/AvmyfeCDtGM0r8zkKt6mFXxl8Y=; b=uMHx8lX8o8zH3vXfkbGvtZCX41PxUWC6V3TxMLVEKiPEsRjFm6gQ6lAIo8FaFuNS7V GeE6R0hQEhEsEzWQtZIQ9J1xCyg/i4Nj3FON6v30ZkQYsic/hr5mpEXj3rgrVN2YlXh4 4aFQovyJswlZ1bBf1QWI6xqeXWvyW2w7Z32ek= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=mGNI9EHQA9XLfGZooKOcpZZI69Hh8eKayHM7FOMKnMAZS0euqQ6fnukLoSW0Gn03xs RFyOr0dFvUmWo209sEKVezOziLcTEmVvtRn62g30TZzL0gLd071dDWkvclfWyCbdO5Jf KePYgW2nHV5zxpqT4vWGKrpMz9Vn33IIhOFgE= Received: by 10.100.136.7 with SMTP id j7mr1493469and.252.1284172238679; Fri, 10 Sep 2010 19:30:38 -0700 (PDT) Received: from centel.dataix.local ([99.181.137.20]) by mx.google.com with ESMTPS id d4sm4901322and.19.2010.09.10.19.30.37 (version=SSLv3 cipher=RC4-MD5); Fri, 10 Sep 2010 19:30:37 -0700 (PDT) Sender: "J. Hellenthal" Message-ID: <4C8AE9CB.9070008@DataIX.net> Date: Fri, 10 Sep 2010 22:30:35 -0400 From: jhell User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.9.2.9) Gecko/20100908 Lightning/1.0b1 Thunderbird MIME-Version: 1.0 To: Aryeh Friedman References: <4C8AE7A2.1090802@DataIX.net> In-Reply-To: <4C8AE7A2.1090802@DataIX.net> X-Enigmail-Version: 1.1.2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit 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: Sat, 11 Sep 2010 02:30:40 -0000 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