From e50fa53fa0112e15d7ee3ab8ed333f16484bd356 Mon Sep 17 00:00:00 2001 From: Stephen Hemminger Date: Wed, 1 Dec 2010 09:04:38 -0800 Subject: Simplify failure message handling 1. If sub-init failed then generate failure (not warning) if exit code is -1. 2. Don't need if test to check for disabled load. --- etc/init.d/vyatta-router | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'etc') diff --git a/etc/init.d/vyatta-router b/etc/init.d/vyatta-router index d77aa96..e7a5783 100755 --- a/etc/init.d/vyatta-router +++ b/etc/init.d/vyatta-router @@ -123,7 +123,6 @@ load_bootfile () fi sg ${GROUP} -c "$vyatta_sbindir/vyatta-config-loader.pl $BOOTFILE" ) - log_end_msg $? } @@ -201,17 +200,14 @@ start () if ! disabled $s; then log_progress_msg $s if ! ${vyatta_sbindir}/${s}.init start - then log_end_msg $? + then log_failure_msg exit 1 fi fi done - if ! disabled configure; then - load_bootfile - else - log_success_msg - fi + disabled configure || load_bootfile + log_end_msg $? cleanup_raid telinit q -- cgit v1.2.3