From: Ivo Timmermans Date: Fri, 19 May 2000 00:15:37 +0000 (+0000) Subject: Errors will not terminate the script or result in a nonzero exit code. X-Git-Tag: release-1.0pre2~36 X-Git-Url: https://tinc-vpn.org/git/browse?a=commitdiff_plain;h=01352f4c525862f05988ed8687f26210c5ba10a2;p=tinc Errors will not terminate the script or result in a nonzero exit code. --- diff --git a/debian/init.d b/debian/init.d index c054ccbe..bb27b141 100644 --- a/debian/init.d +++ b/debian/init.d @@ -1,7 +1,7 @@ #! /usr/bin/perl -w # # System startup script for tinc -# $Id: init.d,v 1.7 2000/05/18 23:09:31 zarq Exp $ +# $Id: init.d,v 1.8 2000/05/19 00:15:37 zarq Exp $ # # Based on Lubomir Bulej's Redhat init script. # @@ -25,7 +25,10 @@ if (! -f $DAEMON) { exit 0; } sub find_nets { - open(FH, $NETSFILE) || die "Please create $NETSFILE.\n"; + if(! open(FH, $NETSFILE)) { + warn "Please create $NETSFILE.\n"; + exit 0; + } while () { chomp; if( /^[ ]*([^ \#]+)/i ) { @@ -33,7 +36,8 @@ sub find_nets { } } if($#NETS == -1) { - die "$NETSFILE doesn't contain any nets.\n"; + warn "$NETSFILE doesn't contain any nets.\n"; + exit 0; } }