From owner-freebsd-questions@FreeBSD.ORG Fri Aug 4 17:01:44 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D0FD016A4E7 for ; Fri, 4 Aug 2006 17:01:44 +0000 (UTC) (envelope-from andrewgould@yahoo.com) Received: from web35313.mail.mud.yahoo.com (web35313.mail.mud.yahoo.com [66.163.179.107]) by mx1.FreeBSD.org (Postfix) with SMTP id C3FCE43D6E for ; Fri, 4 Aug 2006 17:01:40 +0000 (GMT) (envelope-from andrewgould@yahoo.com) Received: (qmail 28889 invoked by uid 60001); 4 Aug 2006 17:01:40 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=gP9ONa8ovZLFcgBzC18/CRFlsoVKRR1ehQyLE2GRCHuL71/Pe7tFZFGO9TEhGQ1m013tMp92FmeQWv9P2EV2GcwPn+n4LgkJroa5vJW5G7GvH7IUojvxbJNFP4GtzJuxvUYwoF/0/C7uUo5IXMLgJqiltWYm9zVWVOStF2OqC8M= ; Message-ID: <20060804170140.28887.qmail@web35313.mail.mud.yahoo.com> Received: from [206.255.31.21] by web35313.mail.mud.yahoo.com via HTTP; Fri, 04 Aug 2006 10:01:40 PDT Date: Fri, 4 Aug 2006 10:01:40 -0700 (PDT) From: Andrew Gould To: DW , freebsd-questions@freebsd.org In-Reply-To: <44D37BAE.7000800@dwinner.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Cc: Subject: Re: .bash_logout and shutdown -- need ideas X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 04 Aug 2006 17:01:44 -0000 --- DW wrote: > Hi all, > > Have a bit of an issue here: > > Just started using a .bash_logout script to handle > doing my unison > commands whenever I logout at end of day so I don't > forget to sync my > local homedir to my server before I head home. > > Works fine as long as I just do a "# exit" when I'm > done. > > But more often than not, I do a "# sudo shutdown -p > now". > > The problem with that though, is that the shutdown > process runs as root, > and just drops the system, and I'm never actually > getting logged out as > much as booted out. So my .bash_logout doesn't run, > and thus no unison > unless I remember to run it manually first. > > Any ideas on how to work around this sitch? > > Thanks, > DW > Instead of using .bash_logout, why don't you create a script that runs all of your logout tasks and then ends with 'sudo shutdown -p now'? Andrew L. Gould