From 7674fe9831db5172d39f82c7961630d6b2417c24 Mon Sep 17 00:00:00 2001 From: Florian Schlichting Date: Mon, 9 Oct 2017 10:17:03 +0200 Subject: [PATCH] 'perl update-davical-database' did not find the intended config file / patchdir people may use that invocation in addition to calling /usr/share/davical/dba/update-debian-database, and happen upon a cryptic error when YAML tries to parse dba/update-davical-database instead of config/administration.yml --- dba/update-davical-database | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dba/update-davical-database b/dba/update-davical-database index e8c2fa7e..8615108d 100755 --- a/dba/update-davical-database +++ b/dba/update-davical-database @@ -26,8 +26,8 @@ my $force_owner = ""; my $config_file = "config/administration.yml"; my $dbadir = $0; -$dbadir =~ s#/[^/]*$##; -my $patchdir = $dbadir . "/patches"; +$dbadir =~ s#[^/]*$##; +my $patchdir = $dbadir . "patches"; # # We look in a few places for the config file. First relative to @@ -35,7 +35,7 @@ my $patchdir = $dbadir . "/patches"; # start to look in absolute locations. Then we give up :-) if ( ! -f $config_file ) { $config_file = $0; - $config_file =~ s{[^/]+/update-[a-z]+-database}{config/administration.yml}; + $config_file =~ s{update-[a-z]+-database}{../config/administration.yml}; } if ( ! -f $config_file ) { $config_file = "/etc/davical/administration.yml";