[28305] in Source-Commits
Re: reactivate commit: Add reactivate-helper to query logind
daemon@ATHENA.MIT.EDU (Benjamin Kaduk)
Sun Jul 6 09:43:54 2014
Date: Sun, 6 Jul 2014 09:43:44 -0400 (EDT)
From: Benjamin Kaduk <kaduk@MIT.EDU>
To: Jonathan D Reed <jdreed@MIT.EDU>
cc: source-commits@MIT.EDU
In-Reply-To: <201407051557.s65Fvlk6032406@drugstore.mit.edu>
Message-ID: <alpine.GSO.1.10.1407060930560.17412@multics.mit.edu>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII
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