[28485] in Source-Commits

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

reactivate commit: Ensure helper exists in reactivate-cleanup

daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Wed Mar 4 14:56:50 2015

Date: Wed, 4 Mar 2015 14:51:40 -0500
From: Jonathan D Reed <jdreed@mit.edu>
Message-Id: <201503041951.t24JpeGT006617@drugstore.mit.edu>
To: source-commits@mit.edu

https://github.com/mit-athena/reactivate/commit/0e5484f3c7ecf0c1586bc24c304ed8102659ec88
commit 0e5484f3c7ecf0c1586bc24c304ed8102659ec88
Author: Jonathan Reed <jdreed@mit.edu>
Date:   Thu Feb 19 09:51:36 2015 -0500

    Ensure helper exists in reactivate-cleanup
    
    In 01debathena-reactivate-cleanup, ensure the helper exists (and yell
    loudly if it doesn't).  Also, add quoting

 debian/01debathena-reactivate-cleanup |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/debian/01debathena-reactivate-cleanup b/debian/01debathena-reactivate-cleanup
index c5964cb..66e632b 100644
--- a/debian/01debathena-reactivate-cleanup
+++ b/debian/01debathena-reactivate-cleanup
@@ -15,11 +15,13 @@ do_reactivate() {
 
 HELPER=/usr/lib/debathena-reactivate/reactivate-helper
 
-if ! $HELPER supported; then
+if ! [ -x "$HELPER" ]; then
+   logger -t reactivate -p daemon.warning "$HELPER does not exist!"
+elif ! "$HELPER" supported; then
     # We can't check; just assume we should (legacy behavior)
     do_reactivate
 else
-    if $HELPER should-reactivate; then
+    if "$HELPER" should-reactivate; then
 	# We should reactivate, so do it
 	do_reactivate
     elif [ $? -ne 1 ]; then

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