X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=julia;h=a9e6173058862e6417ba44b94c7f65df32f9ada3;hb=9206877b2e652ff6b88e3d992205270c45600c5c;hp=6d5ff3746c20caeff54399ee052644187ab4f028;hpb=a092f0aa8e82394e25a16da9e87263ee26b8de0e;p=dak.git diff --git a/julia b/julia index 6d5ff374..a9e61730 100755 --- a/julia +++ b/julia @@ -2,7 +2,7 @@ # Sync PostgreSQL with (LDAP-generated) passwd file # Copyright (C) 2001 James Troup -# $Id: julia,v 1.2 2001-09-27 01:23:41 troup Exp $ +# $Id: julia,v 1.4 2001-11-18 19:57:58 rmurray Exp $ # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -54,23 +54,21 @@ Sync PostgreSQL's pg_user with PASSWD_FILE. def main (): global Cnf, projectB; - apt_pkg.init(); - - Cnf = apt_pkg.newConfiguration(); - apt_pkg.ReadConfigFileISC(Cnf,utils.which_conf_file()); + Cnf = utils.get_conf() Arguments = [('q',"quiet","Julia::Options::Quiet"), ('v',"verbose","Julia::Options::Verbose"), ('h',"help","Julia::Options::Help")]; for i in ["quiet", "verbose", "help" ]: - Cnf["Julia::Options::%s" % (i)] = ""; + if not Cnf.has_key("Julia::Options::%s" % (i)): + Cnf["Julia::Options::%s" % (i)] = ""; arguments = apt_pkg.ParseCommandLine(Cnf,Arguments,sys.argv); Options = Cnf.SubTree("Julia::Options") if Options["Help"]: usage(); - if arguments == []: + if not arguments: utils.warn("julia needs the name of the passwd file to sync with as an argument."); usage(1); elif len(arguments) > 1: