From 162d9b717dcbed0876fd67cbb12ffa4630ea330c Mon Sep 17 00:00:00 2001 From: Alejandro Mery Date: Thu, 21 Oct 2010 23:46:54 +0200 Subject: [PATCH] runit: fixed runit-log-run by readding die() --- base/runit/overlay.d/runit/D%libdir_runit-run.in.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/base/runit/overlay.d/runit/D%libdir_runit-run.in.txt b/base/runit/overlay.d/runit/D%libdir_runit-run.in.txt index c907403d1..ab210ddf8 100644 --- a/base/runit/overlay.d/runit/D%libdir_runit-run.in.txt +++ b/base/runit/overlay.d/runit/D%libdir_runit-run.in.txt @@ -21,6 +21,11 @@ EOT exit 1 } +die() { + [ $# -eq 0 ] || echo "$*" >&2 + exit 1 +} + progname() { case "$1" in /*) echo "$1" ;; @@ -42,8 +47,7 @@ D_sbindir/${TEMPLATE:-runit-run}) PROGNAME="$(progname "$1")"; shift SCRIPT=yes else - echo "$PROGNAME: invalid script" >&2 - exit 1 + die "$PROGNAME: invalid script" >&2 fi ;; *)