lipnitsk / llconf Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/llconf
License: GNU Lesser General Public License v2.1
Automatically exported from code.google.com/p/llconf
License: GNU Lesser General Public License v2.1
What steps will reproduce the problem?
1. Try to compile with any other headed that defines "find_node".
2.
3.
What is the expected output? What do you see instead?
What version of the product are you using? On what operating system?
Please provide any additional information below.
I think that since it returns a cnfnode*, the function could reasonably be
renamed to find_cnfnode.
Patch attached.
Original issue reported on code.google.com by [email protected]
on 25 Jul 2008 at 8:16
Attachments:
What steps will reproduce the problem?
1. llconf ini -f smb.conf list "global"
2.
3.
What is the expected output? What do you see instead?
Produces allot of .unparsed output.
Seems the samba type ini file varies in that
it uses
multiple keywords = "value"
and when multiple keywords are present the lines are ignored.
Example
egrep 'netbios|volume' smb.conf
netbios name = hercules
volume = Hercules
./llconf -p ini -f smb.conf get "global/volume"
Hercules
./llconf -p ini -f smb.conf get "global/netbios name"
(nothing is returned).
What version of the product are you using? On what operating system?
0.4.6, RHEL5
Please provide any additional information below.
Perhaps the samba ini configurations are not standard ini, However, it's a
popular file and I would like to use this command line tool to automate
modification of the file in that format.
Original issue reported on code.google.com by [email protected]
on 13 Dec 2011 at 3:37
What steps will reproduce the problem?
1. Parse an /etc/network/interfaces files that has allow-hotplug entries.
2. Using the dump operation works fine, but the unparse operation produces
(null)
3. Run the command llconf ifupdown -i /etc/network/interfaces -o - unparse
What is the expected output? What do you see instead?
The expected output is
# Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
# /usr/share/doc/ifupdown/examples for more information.
auto lo eth0 eth1 eth2 eth3
iface lo inet loopback
allow-hotplug eth0
iface eth0 inet dhcp
pre-up touch /lib/init/rw/resolv.conf
iface eth1 inet static
address 192.168.0.1
netmask 255.255.255.0
pre-up touch /lib/init/rw/resolv.conf
allow-hotplug eth2
iface eth2 inet dhcp
pre-up touch /lib/init/rw/resolv.conf
allow-hotplug eth3
iface eth3 inet dhcp
pre-up touch /lib/init/rw/resolv.conf
allow-hotplug wlan0
iface wlan0 inet dhcp
pre-up touch /lib/init/rw/resolv.conf
wpa-ssid ssid
wpa-psk psk
BUT it actually is
# Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or
# /usr/share/doc/ifupdown/examples for more information.
auto lo eth0 eth1 eth2 eth3
iface lo inet loopback
(null)
iface eth0 inet dhcp
pre-up touch /lib/init/rw/resolv.conf
iface eth1 inet static
address 192.168.0.1
netmask 255.255.255.0
pre-up touch /lib/init/rw/resolv.conf
(null)
iface eth2 inet dhcp
pre-up touch /lib/init/rw/resolv.conf
(null)
iface eth3 inet dhcp
pre-up touch /lib/init/rw/resolv.conf
(null)
iface wlan0 inet dhcp
pre-up touch /lib/init/rw/resolv.conf
wpa-ssid ssid
wpa-psk psk
What version of the product are you using? On what operating system?
Using 0.4.6.
Please provide any additional information below.
Applying the patch below fixes this:
--- ifupdown-old.c 2009-11-18 14:36:30.000000000 -0500
+++ ifupdown.c 2009-11-18 14:37:09.000000000 -0500
@@ -263,6 +263,16 @@
}
snprintf(b1, 255, "%s\n", b0);
cl_list = append_confline(cl_list, cl =
create_confline(b1));
+ }else if(strncmp(cn_top->name, "allow-", 6) == 0){
+ char buf1[256], *b0 = buf, *b1 = buf1, *tmp;
+
+ snprintf(b0, 255, "%s", cn_top->name);
+ for(cn = cn_top->first_child; cn; cn = cn->next){
+ snprintf(b1, 255, "%s %s", b0, cn->name);
+ tmp = b0; b0 = b1; b1 = tmp;
+ }
+ snprintf(b1, 255, "%s\n", b0);
+ cl_list = append_confline(cl_list, cl =
create_confline(b1));
}else if(strcmp(cn_top->name, "mapping") == 0){
cn = cn_top->first_child;
Original issue reported on code.google.com by [email protected]
on 18 Nov 2009 at 7:49
What steps will reproduce the problem?
1. Download latest, and build with "dpkg-buildpackage -rfakeroot -us -uc"
2. llconf syslog-ng -i /import/tonic/bedge/llconf/syslog-ng.conf -s dump
What is the expected output? What do you see instead?
I would have expected a syntex tree for the config file.
There was no output, llconf did not complete.
What version of the product are you using? llconf-0.4.6.tar.gz
On what operating system? Ubuntu 8.04
Please provide any additional information below.
Here's the strace output up to the hang:
execve("/usr/bin/llconf", ["llconf", "syslog-ng", "-i",
"/import/tonic/bedge/llconf/syslo"..., "-s", "dump"], [/* 58 vars */]) = 0
brk(0) = 0x804c000
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb7f1a000
access("/etc/ld.so.preload", R_OK) = -1 ENOENT (No such file or directory)
open("/users/bedge/lib/tls/i686/sse2/cmov/libllconf.so.0", O_RDONLY) = -1
ENOENT (No such file or directory)
stat64("/users/bedge/lib/tls/i686/sse2/cmov", 0xbfed4fe0) = -1 ENOENT (No
such file or directory)
open("/users/bedge/lib/tls/i686/sse2/libllconf.so.0", O_RDONLY) = -1 ENOENT
(No such file or directory)
stat64("/users/bedge/lib/tls/i686/sse2", 0xbfed4fe0) = -1 ENOENT (No such
file or directory)
open("/users/bedge/lib/tls/i686/cmov/libllconf.so.0", O_RDONLY) = -1 ENOENT
(No such file or directory)
stat64("/users/bedge/lib/tls/i686/cmov", 0xbfed4fe0) = -1 ENOENT (No such
file or directory)
open("/users/bedge/lib/tls/i686/libllconf.so.0", O_RDONLY) = -1 ENOENT (No
such file or directory)
stat64("/users/bedge/lib/tls/i686", 0xbfed4fe0) = -1 ENOENT (No such file
or directory)
open("/users/bedge/lib/tls/sse2/cmov/libllconf.so.0", O_RDONLY) = -1 ENOENT
(No such file or directory)
stat64("/users/bedge/lib/tls/sse2/cmov", 0xbfed4fe0) = -1 ENOENT (No such
file or directory)
open("/users/bedge/lib/tls/sse2/libllconf.so.0", O_RDONLY) = -1 ENOENT (No
such file or directory)
stat64("/users/bedge/lib/tls/sse2", 0xbfed4fe0) = -1 ENOENT (No such file
or directory)
open("/users/bedge/lib/tls/cmov/libllconf.so.0", O_RDONLY) = -1 ENOENT (No
such file or directory)
stat64("/users/bedge/lib/tls/cmov", 0xbfed4fe0) = -1 ENOENT (No such file
or directory)
open("/users/bedge/lib/tls/libllconf.so.0", O_RDONLY) = -1 ENOENT (No such
file or directory)
stat64("/users/bedge/lib/tls", 0xbfed4fe0) = -1 ENOENT (No such file or
directory)
open("/users/bedge/lib/i686/sse2/cmov/libllconf.so.0", O_RDONLY) = -1
ENOENT (No such file or directory)
stat64("/users/bedge/lib/i686/sse2/cmov", 0xbfed4fe0) = -1 ENOENT (No such
file or directory)
open("/users/bedge/lib/i686/sse2/libllconf.so.0", O_RDONLY) = -1 ENOENT (No
such file or directory)
stat64("/users/bedge/lib/i686/sse2", 0xbfed4fe0) = -1 ENOENT (No such file
or directory)
open("/users/bedge/lib/i686/cmov/libllconf.so.0", O_RDONLY) = -1 ENOENT (No
such file or directory)
stat64("/users/bedge/lib/i686/cmov", 0xbfed4fe0) = -1 ENOENT (No such file
or directory)
open("/users/bedge/lib/i686/libllconf.so.0", O_RDONLY) = -1 ENOENT (No such
file or directory)
stat64("/users/bedge/lib/i686", 0xbfed4fe0) = -1 ENOENT (No such file or
directory)
open("/users/bedge/lib/sse2/cmov/libllconf.so.0", O_RDONLY) = -1 ENOENT (No
such file or directory)
stat64("/users/bedge/lib/sse2/cmov", 0xbfed4fe0) = -1 ENOENT (No such file
or directory)
open("/users/bedge/lib/sse2/libllconf.so.0", O_RDONLY) = -1 ENOENT (No such
file or directory)
stat64("/users/bedge/lib/sse2", 0xbfed4fe0) = -1 ENOENT (No such file or
directory)
open("/users/bedge/lib/cmov/libllconf.so.0", O_RDONLY) = -1 ENOENT (No such
file or directory)
stat64("/users/bedge/lib/cmov", 0xbfed4fe0) = -1 ENOENT (No such file or
directory)
open("/users/bedge/lib/libllconf.so.0", O_RDONLY) = -1 ENOENT (No such file
or directory)
stat64("/users/bedge/lib", 0xbfed4fe0) = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=174566, ...}) = 0
mmap2(NULL, 174566, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7eef000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/usr/lib/libllconf.so.0", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\240,\0"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=252552, ...}) = 0
mmap2(NULL, 83192, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0xb7eda000
mmap2(0xb7eee000, 4096, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x14) = 0xb7eee000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/tls/i686/cmov/libc.so.6", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\260e\1"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1364388, ...}) = 0
mmap2(NULL, 1369712, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0)
= 0xb7d8b000
mmap2(0xb7ed4000, 12288, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x149) = 0xb7ed4000
mmap2(0xb7ed7000, 9840, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7ed7000
close(3) = 0
access("/etc/ld.so.nohwcap", F_OK) = -1 ENOENT (No such file or directory)
open("/lib/tls/i686/cmov/libdl.so.2", O_RDONLY) = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0p\n\0\000"..., 512)
= 512
fstat64(3, {st_mode=S_IFREG|0644, st_size=9684, ...}) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb7d8a000
mmap2(NULL, 12412, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) =
0xb7d86000
mmap2(0xb7d88000, 8192, PROT_READ|PROT_WRITE,
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1) = 0xb7d88000
close(3) = 0
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb7d85000
set_thread_area({entry_number:-1 -> 6, base_addr:0xb7d856b0, limit:1048575,
seg_32bit:1, contents:0, read_exec_only:0, limit_in_pages:1,
seg_not_present:0, useable:1}) = 0
mprotect(0xb7ed4000, 4096, PROT_READ) = 0
munmap(0xb7eef000, 174566) = 0
brk(0) = 0x804c000
brk(0x806d000) = 0x806d000
open("/import/tonic/bedge/llconf/syslog-ng.conf", O_RDONLY) = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=9745, ...}) = 0
mmap2(NULL, 8192, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) =
0xb7f18000
read(3, "# \n# vim: set tabstop=4 shiftwid"..., 8192) = 8192
read(3, "on(df_daemon); };\n\n# kern.* "..., 8192) = 1553
read(3, "", 8192) = 0
The conf file is attached.
Original issue reported on code.google.com by [email protected]
on 21 Jul 2008 at 11:54
Attachments:
What steps will reproduce the problem?
1. try to extract data from conserver.cf file
2. dump works OK, but get, find, list don't
3.
What is the expected output?
Any of the following commands should output data.
What do you see instead?
No matches found
eg:
dump is OK:
0 %> llconf conserver -i /import/tonic/bedge/llconf/conserver.cf -s dump | tail
console ssp8400-b596 { master localhost; type exec; exec
telnet labsuns 9043; }
console ssp8400-b029 { master localhost; type exec; exec
telnet labsuns 9044; }
console q29 { master localhost; type exec; exec telnet
labsuns 9029; }
access * {
# trusted localhost
#trusted localhost build1 saaz fastbuild melomel
lumpling wave walia tach1 build2;
#allow
device = ' 10.4.2.0 12.31.172.0 12.31.174.0
12.42.120.0'
}
I can't get any data back from these commands.
(maybe I'm just blowing it, but similar commands worked with the ifupdown
parser)
0 %> llconf conserver -i /import/tonic/bedge/llconf/conserver.cf list
server/console
1 %> llconf conserver -i /import/tonic/bedge/llconf/conserver.cf list
server/console/q29
0 %> llconf conserver -i /import/tonic/bedge/llconf/conserver.cf find
server/console/q29
0 %> llconf conserver -i /import/tonic/bedge/llconf/conserver.cf find q29
What version of the product are you using? On what operating system?
ubuntu 7.10
Please provide any additional information below.
onserver.cf is attached
Original issue reported on code.google.com by [email protected]
on 23 Jul 2008 at 11:18
Attachments:
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.