From 08e8f724674eb96678dcabf856534c58f5c29996 Mon Sep 17 00:00:00 2001 From: Arch Librarian Date: Mon, 20 Sep 2004 16:50:59 +0000 Subject: Sync Author: jgg Date: 1998-09-22 05:30:24 GMT Sync --- apt-pkg/init.cc | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'apt-pkg/init.cc') diff --git a/apt-pkg/init.cc b/apt-pkg/init.cc index f8cf54ee4..e171d2c6c 100644 --- a/apt-pkg/init.cc +++ b/apt-pkg/init.cc @@ -1,6 +1,6 @@ // -*- mode: cpp; mode: fold -*- // Description /*{{{*/ -// $Id: init.cc,v 1.4 1998/07/26 04:49:26 jgg Exp $ +// $Id: init.cc,v 1.5 1998/09/22 05:30:24 jgg Exp $ /* ###################################################################### Init - Initialize the package library @@ -9,6 +9,9 @@ /*}}}*/ // Include files /*{{{*/ #include + +#include +#include /*}}}*/ // pkgInitialize - Initialize the configuration class /*{{{*/ @@ -42,7 +45,12 @@ bool pkgInitialize(Configuration &Cnf) Cnf.Set("Dir::Etc","/etc/apt/"); Cnf.Set("Dir::Etc::sourcelist","sources.list"); Cnf.Set("Dir::Etc::main","apt.conf"); - - return true; + + // Read the main config file + string FName = Cnf.FindDir("Dir::Etc::main"); + struct stat Buf; + if (stat(FName.c_str(),&Buf) != 0) + return true; + return ReadConfigFile(Cnf,FName); } /*}}}*/ -- cgit v1.2.3