Fix in pakfire functions.sh
Message ID | 1465546421-534-1-git-send-email-jonatan.schlag@ipfire.org |
---|---|
State | Accepted |
Commit | e6fd1f2d3876aae2c37051fce718f68712fdee4a |
Headers |
Return-Path: <development-bounces@lists.ipfire.org> Received: from mail01.ipfire.org (hedwig.ipfire.org [172.28.1.200]) by web02.ipfire.org (Postfix) with ESMTP id 03E3E6154F for <patchwork@ipfire.org>; Fri, 10 Jun 2016 10:04:54 +0200 (CEST) Received: from mail01.ipfire.org (localhost [IPv6:::1]) by mail01.ipfire.org (Postfix) with ESMTP id 900ED183C; Fri, 10 Jun 2016 10:04:53 +0200 (CEST) Received: from fangorn.local.familyschlag (dslb-088-073-217-236.088.073.pools.vodafone-ip.de [88.73.217.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) by mail01.ipfire.org (Postfix) with ESMTPSA id 193FA1591; Fri, 10 Jun 2016 10:04:52 +0200 (CEST) From: Jonatan Schlag <jonatan.schlag@ipfire.org> To: development@lists.ipfire.org Subject: [PATCH] Fix in pakfire functions.sh Date: Fri, 10 Jun 2016 10:13:41 +0200 Message-Id: <1465546421-534-1-git-send-email-jonatan.schlag@ipfire.org> X-Mailer: git-send-email 2.1.4 X-BeenThere: development@lists.ipfire.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: IPFire development talk <development.lists.ipfire.org> List-Unsubscribe: <http://lists.ipfire.org/mailman/options/development>, <mailto:development-request@lists.ipfire.org?subject=unsubscribe> List-Archive: <http://lists.ipfire.org/pipermail/development/> List-Post: <mailto:development@lists.ipfire.org> List-Help: <mailto:development-request@lists.ipfire.org?subject=help> List-Subscribe: <http://lists.ipfire.org/mailman/listinfo/development>, <mailto:development-request@lists.ipfire.org?subject=subscribe> Errors-To: development-bounces@lists.ipfire.org Sender: "Development" <development-bounces@lists.ipfire.org> |
Message
Jonatan Schlag
June 10, 2016, 6:13 p.m. UTC
The if statement in line 89 and 99 are useless with the -e
conditional expression because it returns true if the path ist a
regular file or a directory.
So "/etc/init.d/ " returns true and "/etc/init.d/avahi" return also true,
but the statement should return only true if we have a regular file.
So -f if the right conditional expression, and we only try to execute
the init script if the path "/etc/init.d/${1}" points to a regular file.
Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
---
src/pakfire/lib/functions.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)