From 5292259a81d2a449f426aa9707d88740069346b4 Mon Sep 17 00:00:00 2001 From: Alejandro Mery Date: Mon, 11 Oct 2010 09:33:55 +0200 Subject: [PATCH] clockspeed: changed clockctl to send errors to stderr --- network/clockspeed/clockctl.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/network/clockspeed/clockctl.sh b/network/clockspeed/clockctl.sh index d894089af..ba3332ad8 100644 --- a/network/clockspeed/clockctl.sh +++ b/network/clockspeed/clockctl.sh @@ -3,7 +3,7 @@ # This copyright note is auto-generated by ./scripts/Create-CopyPatch. # # Filename: package/.../clockspeed/clockctl.sh -# Copyright (C) 2008 The OpenSDE Project +# Copyright (C) 2008 - 2010 The OpenSDE Project # # More information can be found in the files COPYING and README. # @@ -18,12 +18,16 @@ # wcm, 2003.11.26 - 2003.11.26 # === +die() { + echo "$0: $*" >&2 + exit 1 +} + # read configuration: if [ -r /etc/conf/clockspeed ] ; then . /etc/conf/clockspeed else - echo "$0: configuration error: unable to read /etc/conf/clockspeed" - exit 1 + die "configuration error: unable to read /etc/conf/clockspeed" fi # clock_pick function: @@ -34,8 +38,7 @@ clock_pick() { tai|TAI) D_bindir/taiclock "${CLOCK_IP}" ;; *) - echo "$0: configuration error: CLOCK_TYPE not recognized" - exit 1 + die "configuration error: CLOCK_TYPE not recognized" ;; esac }