From owner-freebsd-hackers@FreeBSD.ORG Fri Sep 10 17:03: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 73CAA106564A for ; Fri, 10 Sep 2010 17:03:50 +0000 (UTC) (envelope-from yanegomi@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 059CC8FC0A for ; Fri, 10 Sep 2010 17:03:49 +0000 (UTC) Received: by fxm4 with SMTP id 4so2207648fxm.13 for ; Fri, 10 Sep 2010 10:03:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type:content-transfer-encoding; bh=2t7V+3GAWzdtmey+Zi1E3OlcZ8gbbc5XtPcSZXvD0w8=; b=otyQYb7c8ic5ivDOehD/tGZqo22PDbZVRJZ1iNDZ7by2WkA2a4T0q0qKJuXTvj5pcG hoySYNVezB3o5+WixCIhfuTayXW75IGWHQQIl00Lhv3Uy2/8ZhyWOKxj4vlIdHkImmfX YpC51b8CjpqQSwVhcwloVlwWBNNhpHIbr42Hk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=lWshpyqKkx9rLLGonlzSh5BKNs7JH/xRqjDf/XB139b63fTZZoZZTYmPAaStbCwkg9 BIRS7qX5fTi8zBLksgjOYQkpXWnP5/wvF3HpxmpEuI9dWvjFjvjkytQ3i3HyRNE2EBIt T+NSxwGGfaURpbfZgMNFbW+CG9fdIwfyXEGvk= MIME-Version: 1.0 Received: by 10.204.82.137 with SMTP id b9mr723240bkl.127.1284138228826; Fri, 10 Sep 2010 10:03:48 -0700 (PDT) Sender: yanegomi@gmail.com Received: by 10.204.113.79 with HTTP; Fri, 10 Sep 2010 10:03:48 -0700 (PDT) In-Reply-To: References: Date: Fri, 10 Sep 2010 10:03:48 -0700 X-Google-Sender-Auth: mYcIFoG_3qQq3bDhx9h28-GQRk0 Message-ID: From: Garrett Cooper To: Aryeh Friedman Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 17:03:50 -0000 On Thu, Sep 9, 2010 at 8:27 PM, Aryeh Friedman w= rote: > 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. =A0 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... =A0so 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) This is probably a silly suggestion, but as I see it there is another option: a periodic script which goes and commits the files if the sessions go away (via crontab, or whatever). In particular, this would solve the problem if one of the sessions you had quit, but you had more than one session open to the machine. Of course if you didn't care about the contents of the files you could take a different approach and employ something similar in .login, but it doesn't sound like that's what you want to do either, and that wouldn't solve the multi-session problem... Cheers, -Garrett