Gossamer Forum
Home : Products : DBMan : Customization :

Re: [knue] Updating many cfg files at once.

Quote Reply
Re: [knue] Updating many cfg files at once. In reply to
EDIT: copy and paste got me in trouble. take out the line about user-list. i've removed it below

great! so basically change the following in sub build_external_select field
from
$external_db=$db_script_path . '/' . lc($column) . '.db';
open (DB, "<$external_db") or &cgierr("unable to open $column.db. Reason: $!");
if ($db_use_flock) { flock(DB, 1); }
LINE: while (<DB> ) {
next if /^#/;
next if /^\s*$/;
$line = $_;
chomp ($line);
push (@selectfields, $line);
}


to

open (PASS, "<$auth_pw_file") or &cgierr ("unable to open: $auth_pw_file.\nReason: $!");
if ($db_use_flock) { flock(PASS, 1); }
@lines = <PASS>;
close PASS;

# If we are inquiring, let's look for the specified user.
my (@data);

LINE: foreach $line (@lines) {
$line =~ /^#/ and next LINE;
$line =~ /^\s*$/ and next LINE;
chomp $line;
@data = split (/:/, $line);
push (@selectfields, $data[0]);
}

since i'm just working on excerpt, i may be missing a bracket somewhere...

Last edited by:

delicia: Dec 1, 2015, 6:02 PM
Subject Author Views Date
Thread; hot thread Updating many cfg files at once. knue 17394 Nov 30, 2015, 12:17 PM
Thread; hot thread Re: [knue] Updating many cfg files at once.
delicia 17157 Dec 1, 2015, 6:22 AM
Post; hot thread Re: [delicia] Updating many cfg files at once.
delicia 17165 Dec 1, 2015, 8:50 AM
Thread; hot thread Re: [delicia] Updating many cfg files at once.
knue 17172 Dec 1, 2015, 2:48 PM
Thread; hot thread Re: [knue] Updating many cfg files at once.
delicia 17163 Dec 1, 2015, 5:19 PM
Thread; hot thread Re: [delicia] Updating many cfg files at once.
knue 17133 Dec 1, 2015, 5:25 PM
Thread; hot thread Re: [knue] Updating many cfg files at once.
knue 17158 Dec 1, 2015, 5:27 PM
Thread; hot thread Re: [knue] Updating many cfg files at once.
delicia 17160 Dec 1, 2015, 5:31 PM
Thread; hot thread Re: [delicia] Updating many cfg files at once.
delicia 17118 Dec 1, 2015, 5:34 PM
Thread; hot thread Re: [delicia] Updating many cfg files at once.
knue 17155 Dec 1, 2015, 5:42 PM
Thread; hot thread Re: [knue] Updating many cfg files at once.
delicia 17149 Dec 1, 2015, 5:53 PM
Thread; hot thread Re: [delicia] Updating many cfg files at once.
knue 17114 Dec 1, 2015, 6:15 PM
Thread; hot thread Re: [knue] Updating many cfg files at once.
delicia 17106 Dec 1, 2015, 6:36 PM
Thread; hot thread Re: [delicia] Updating many cfg files at once.
delicia 17114 Dec 1, 2015, 6:38 PM
Thread; hot thread Re: [delicia] Updating many cfg files at once.
knue 17099 Dec 1, 2015, 6:54 PM
Thread; hot thread Re: [knue] Updating many cfg files at once.
knue 17041 Dec 2, 2015, 9:50 PM
Thread; hot thread Re: [knue] Updating many cfg files at once.
delicia 17025 Dec 3, 2015, 1:54 PM
Thread; hot thread Re: [delicia] Updating many cfg files at once.
knue 17025 Dec 3, 2015, 8:13 PM
Post; hot thread Re: [knue] Updating many cfg files at once.
delicia 17004 Dec 4, 2015, 6:20 AM
Post; hot thread Re: [delicia] Updating many cfg files at once.
knue 17062 Dec 3, 2015, 11:56 AM