From 759a13f3ccad95e2717871b803729d49be18d995 Mon Sep 17 00:00:00 2001 From: Donald Sharp Date: Tue, 19 May 2015 18:03:46 -0700 Subject: [PATCH] If the .conf file for a process is missing have /etc/init.d/quagga touch it so we can start the process --- debian/quagga.init.d | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/debian/quagga.init.d b/debian/quagga.init.d index c92ffa2ecb..1ce7686a37 100755 --- a/debian/quagga.init.d +++ b/debian/quagga.init.d @@ -72,10 +72,12 @@ check_daemon() # check for config file if [ -n "$2" ]; then if [ ! -r "$C_PATH/$1-$2.conf" ]; then - return 1 + touch "$C_PATH/$1-$2.conf" + chown quagga:quagga "$C_PATH/$1-$2.conf" fi elif [ ! -r "$C_PATH/$1.conf" ]; then - return 1 + touch "$C_PATH/$1.conf" + chown quagga:quagga "$C_PATH/$1.conf" fi fi return 0 @@ -105,7 +107,7 @@ start() elif [ -n "$2" ]; then echo -n " $1-$2" if ! check_daemon $1 $2 ; then - echo -n " (not started without config file)" + echo -n " (binary does not exist)" return; fi @@ -117,8 +119,8 @@ start() `eval echo "$""$1""_options"` -n "$2" else echo -n " $1" - if ! check_daemon $1; then - echo -n " (not started without config file)" + if ! check_daemon $1; then + echo -n " (binary does not exist)" return; fi -- 2.39.5