From: Don Armstrong Date: Wed, 10 Jan 2007 06:23:11 +0000 (-0800) Subject: * Use Debbugs::Config and the new $gLibPath global X-Git-Tag: release/2.6.0~585^2^2~42 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=63d0a5c3c505331e45a4ea47b33e0e7560d2117a;p=debbugs.git * Use Debbugs::Config and the new $gLibPath global --- diff --git a/scripts/process.in b/scripts/process.in index bdeec7f7..43387b27 100755 --- a/scripts/process.in +++ b/scripts/process.in @@ -4,9 +4,7 @@ # Usage: process nn # Temps: incoming/Pnn -use POSIX qw(strftime tzset); -$ENV{"TZ"} = 'UTC'; -tzset(); +use POSIX qw(strftime); use MIME::Parser; use Debbugs::MIME qw(decode_rfc1522 create_mime_message); @@ -14,14 +12,13 @@ use Debbugs::Mail qw(send_mail_message encode_headers); use Debbugs::Packages qw(getpkgsrc); use Debbugs::User qw(read_usertags write_usertags); -my $config_path = '/etc/debbugs'; -my $lib_path = '/usr/lib/debbugs'; - # TODO DLA; needs config reworking and errorlib reworking # use warnings; # use strict; -require "$config_path/config"; +use Debbugs::Config qw(:globals); +my $lib_path = $gLibPath; + require "$lib_path/errorlib"; $ENV{'PATH'} = $lib_path.':'.$ENV{'PATH'}; diff --git a/scripts/processall.in b/scripts/processall.in index 1d7496d1..263f2ee7 100755 --- a/scripts/processall.in +++ b/scripts/processall.in @@ -8,10 +8,12 @@ # Creates: incoming/E.nn # Stop: stop -$config_path = '/etc/debbugs'; -$lib_path = '/usr/lib/debbugs'; -require "$config_path/config"; +use Debbugs::Config qw(:globals); + +my $lib_path = $gLibPath; + + require "$lib_path/errorlib"; $ENV{'PATH'} = $lib_path.':'.$ENV{'PATH'}; diff --git a/scripts/receive.in b/scripts/receive.in index 815b6c80..df602bbf 100755 --- a/scripts/receive.in +++ b/scripts/receive.in @@ -5,11 +5,9 @@ #set umask in order to have group-writable incoming/* #umask(002); -#load configuration file -$config_path = '/etc/debbugs'; -#$lib_path = '/usr/lib/debbugs'; +use Debbugs::Config qw(:globals); +my $lib_path = $gLibPath; -require "$config_path/config"; $ENV{'PATH'} = '/usr/lib/debbugs:'.$ENV{'PATH'}; #set source of mail delivery diff --git a/scripts/service.in b/scripts/service.in index 1c03c273..4730b8bd 100755 --- a/scripts/service.in +++ b/scripts/service.in @@ -10,10 +10,8 @@ use Debbugs::MIME qw(decode_rfc1522 encode_rfc1522); use Debbugs::Mail qw(send_mail_message); use Debbugs::User; -$config_path = '/etc/debbugs'; -$lib_path = '/usr/lib/debbugs'; - -require "$config_path/config"; +use Debbugs::Config qw(:globals); +$lib_path = $gLibPath; require "$lib_path/errorlib"; $ENV{'PATH'} = $lib_path.':'.$ENV{'PATH'};