[28325] 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 (Benjamin Kaduk)
Sun Jul 6 16:07:00 2014

Date: Sun, 6 Jul 2014 16:06:50 -0400 (EDT)
From: Benjamin Kaduk <kaduk@MIT.EDU>
To: Jonathan D Reed <jdreed@MIT.EDU>
cc: "source-commits@MIT.EDU" <source-commits@MIT.EDU>
In-Reply-To: <B2ACE361-0940-474C-BA63-E322C48A23D0@mit.edu>
Message-ID: <alpine.GSO.1.10.1407061605490.17412@multics.mit.edu>
MIME-Version: 1.0
Content-Type: MULTIPART/MIXED; BOUNDARY="-559023410-1579874866-1404677210=:17412"

  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.

---559023410-1579874866-1404677210=:17412
Content-Type: TEXT/PLAIN; charset=Windows-1252; format=flowed
Content-Transfer-Encoding: QUOTED-PRINTABLE

On Sun, 6 Jul 2014, Jonathan D Reed wrote:

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

Ah, that's fair.
On first reading, I had gotten myself thinking that things could silently=
=20
proceed if there was an executable named 'supported' in the PATH, but=20
that's clearly not true.

You can consider my request withdrawn.

-Ben

>
> 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/d2b173df10698623a45fe9f=
a5a720c5a21e1fdb4
>>> 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=3D/usr/lib/debathena-reactivate/reactivate-helper
>>> +
>>> +if ! $HELPER supported; then
>>
>> I think I would prefer to have a check for [ -x "$HELPER" ] with fallbac=
k to logger, before making this call.  Yes, we ship that file as part of th=
is 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
>>> +=09# We should reactivate, so do it
>>> +=09do_reactivate
>>> +    elif [ $? -ne 1 ]; then
>>> +=09# An error occurred while determining if we should reactivate
>>> +=09# Fail-safe and reactivate anyway (at risk of the user losing data)
>>> +=09do_reactivate
>>> +    fi
>>> +fi
>
>
---559023410-1579874866-1404677210=:17412--

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