|
From: Bruce S. <bw...@ar...> - 2004-02-01 02:23:22
|
> >>>Shouldn't we move firewall.rules to /etc/sysconfig/network? > >>>/etc/sysconfig will propably be always be selected for upgrade. > >> > >>That's a good thought, I would agree to this. > >>Of course upgrade-config needs to take care of this. > > > > It is a script. An init script. > > It's the "config file" of /etc/init.d/firewall, isn't it? :-) It's that too! :-) > > All the other init scripts are in init.d. > > I guess it could go either place... :-) > > Was just a thought to make it more intuitive to see which files > will propably need migration/copying from version to version. I don't know which place is better. It's easier to leave it alone. :-) > > As far as default files to be selected in update-config, I think we > > should make a table of files (and maybe directories) that are initially > > selected, and leave everything else turned off. > > > > I REALLY don't want to make a mistake and select anything by default > > that shouldn't be. A novice may not know what a file is, and ass-u-me > > that since we defaulted it to be copied that it should be. > > Absolutely right. What's the most efficient way to check each file against a large list of filenames in a script? I'm thinking a bunch of lines like this isn't the best. [ $i = file1 ] && ..." [ $i = file2 ] && ..." [ $i = file3 ] && ..." .... Or a big long case statement? case $i in file1 | file2 | file3 | ... ) Or putting all the files to check in a text file, and doing a: "[ $(grep -xc $i filelist.txt) -eq 1 ] && ..." Or something else? The grep example is the cleanest bash code, but what about performance? The upgrade-config script is already a little slow, and I'm more concerned about speed than how it looks. (my guess is still grep, but I'd like hear other thoughts) - BS |