![]() |
ispcp integration behavior - Printable Version +- ispCP - Board - Support (http://www.isp-control.net/forum) +-- Forum: ispCP Omega Development Area (/forum-1.html) +--- Forum: General discussion (/forum-11.html) +--- Thread: ispcp integration behavior (/thread-685.html) |
ispcp integration behavior - sawoy - 05-27-2007 06:37 AM Hi all, have i a question: why ispcp integrates into work server with rewriting some files ? For example, /etc/hosts and /etc/resolv.conf. Why it doesn't create any backup copies of these files ? is it a incorrect behavior ? ot that should be by some ideology ? RE: ispcp integration behavior - joximu - 05-27-2007 07:21 AM I agree... RE: ispcp integration behavior - sawoy - 05-27-2007 04:10 PM here is a patch that solve this in simplest way. i don't yet test it - it is just for example as possible solution... Code: # diff -updr /root/development/trunk/engine /work/ RE: ispcp integration behavior - raphael - 05-28-2007 10:10 AM @sawoy: that modification would generate many useless files. RE: ispcp integration behavior - sawoy - 05-28-2007 02:13 PM raphael Wrote:@sawoy: that modification would generate many useless files. Hm. 1. Now "many useless files" is 2. 2. Which solution can you offer ? I think about 3 ways/solutions: - backup all required for backup files - analyze (parse) all required files and add only required by ISPCP lines [that requires understanding which lines are required at all] - do not touch these files [supposed that administrator of server already set up hosts and resolv.conf ] RE: ispcp integration behavior - raphael - 05-29-2007 08:26 AM I already developed a fix, but I haven't commited it because it seems like, at least, openbsd's sed doesn't support the -r argument, which I need. What my solution does is: make backup of resolv.conf, strip from it all the nameserver lines, add new nameserver lines, save file. RE: ispcp integration behavior - sawoy - 05-29-2007 08:41 AM ok. it is good. have questions: - why do not you use perl for platform-independent code ? why sed ? - with this patch after installation my old preferences will work and my server will be able resolve domains properly ? - do you fix it for hosts file ? RE: ispcp integration behavior - raphael - 05-29-2007 09:18 AM sawoy Wrote:- why do not you use perl for platform-independent code ? why sed ?Because I don't know perl, so I do what I can. The only problem with sed is that it seems (at least GNU's sed) doesn't support my regex if the -r param isn't passed (extended regex). sawoy Wrote:- with this patch after installation my old preferences will work and my server will be able resolve domains properly ?sure sawoy Wrote:- do you fix it for hosts file ?haven't done that yet, because I first want to find a real solution that applies to both cases. |