mbox

Fix in pakfire functions.sh

Message ID 1465546421-534-1-git-send-email-jonatan.schlag@ipfire.org
State Accepted
Commit e6fd1f2d3876aae2c37051fce718f68712fdee4a
Headers

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(-)