[28318] in Source-Commits

home help back first fref pref prev next nref lref last post

Re: reactivate commit: Add reactivate-helper to query logind

daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Sun Jul 6 14:13:57 2014

From: Jonathan D Reed <jdreed@MIT.EDU>
To: Benjamin J Kaduk <kaduk@MIT.EDU>
CC: "source-commits@MIT.EDU" <source-commits@MIT.EDU>
Date: Sun, 6 Jul 2014 18:13:46 +0000
Message-ID: <B2ACE361-0940-474C-BA63-E322C48A23D0@mit.edu>
In-Reply-To: <alpine.GSO.1.10.1407060930560.17412@multics.mit.edu>
Content-Language: en-US
Content-Type: text/plain; charset="Windows-1252"
Content-ID: <1E561B180988354EBD94A42B9F28D6F1@exchange.mit.edu>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit

Yeah, I thought about this.  The clause will still run (and generate a “not found” on stderr, which at that point is still lightdm’s log).  I’m happy to whine louder on syslog, but there’s also nothing we can do if the command doesn’t exist, apart from “assume we should reactivate anyway”, which we do.

-Jon

On Jul 6, 2014, at 9:43 AM, Benjamin Kaduk <kaduk@MIT.EDU> wrote:

> On Sat, 5 Jul 2014, Jonathan D Reed wrote:
> 
>> https://github.com/mit-athena/reactivate/commit/d2b173df10698623a45fe9fa5a720c5a21e1fdb4
>> commit d2b173df10698623a45fe9fa5a720c5a21e1fdb4
>> Author: Jonathan Reed <jdreed@mit.edu>
>> Date:   Tue Jul 1 15:44:27 2014 -0400
>> 
>> diff --git a/debian/01debathena-reactivate-cleanup b/debian/01debathena-reactivate-cleanup
>> index 97422dd..c5964cb 100644
>> --- a/debian/01debathena-reactivate-cleanup
>> +++ b/debian/01debathena-reactivate-cleanup
>> +
>> +HELPER=/usr/lib/debathena-reactivate/reactivate-helper
>> +
>> +if ! $HELPER supported; then
> 
> I think I would prefer to have a check for [ -x "$HELPER" ] with fallback to logger, before making this call.  Yes, we ship that file as part of this package, so it "should" always be there, but...
> 
> -Ben
> 
>> +    # We can't check; just assume we should (legacy behavior)
>> +    do_reactivate
>> +else
>> +    if $HELPER should-reactivate; then
>> +	# We should reactivate, so do it
>> +	do_reactivate
>> +    elif [ $? -ne 1 ]; then
>> +	# An error occurred while determining if we should reactivate
>> +	# Fail-safe and reactivate anyway (at risk of the user losing data)
>> +	do_reactivate
>> +    fi
>> +fi



home help back first fref pref prev next nref lref last post