**** BEGIN LOGGING AT Sat Sep 06 02:59:57 2008 Sep 06 12:21:00 Hi people ! Sep 06 12:21:07 exovii: what? Sep 06 12:21:15 nbd: here ? Sep 06 13:04:40 xMff: ping? Sep 06 13:06:49 xMff: luci doesn't appear to be running init.d/luci_ethers when you add ethers and apply. Sep 06 13:19:42 frogonwheels_: unlikely Sep 06 13:24:08 frogonwheels_: tested it right now and seems to work Sep 06 13:25:50 ok Sep 06 13:25:53 :| Sep 06 13:26:17 xMff: Oh wait. I rebooted. Sep 06 13:26:50 it's enabled - so shouldn't be a problem. Sep 06 13:26:52 strange. Sep 06 13:27:24 xMff: btw it's working happier now that I've got the latest code on my router. Sep 06 13:27:33 just this little hickup. Sep 06 13:27:51 nice Sep 06 13:28:09 so no freezes etc? Sep 06 13:28:31 now that I've reorganised my asteriskuci config stuff - I'm ready to get going. Sep 06 13:28:52 xMff: no. a few issues with th efirewall, but that's nbd's baby I think Sep 06 13:29:12 frogonwheels_: blogic maintains it Sep 06 13:29:17 afaik Sep 06 13:29:18 oh yeah blogic Sep 06 13:30:24 frogonwheels_: you can type uvl genspec asterisk on the shell, it should print out a scheme template, would be nice if you can send it to me Sep 06 13:33:40 xMff: how can I see it in action? Sep 06 13:35:30 xMff: where do I put it? Sep 06 13:51:12 xMff: is there a 'real' datatype? Sep 06 13:52:25 frogonwheels_: https://dev.leipzig.freifunk.net/trac/browser/ff-luci/trunk/libs/uvl/luasrc/uvl/datatypes.lua Sep 06 13:52:25 short answer: yes, it's called float Sep 06 13:52:59 ok - I'm filling in the spec now. Sep 06 13:53:19 but that auto generated thing is a great start! Sep 06 13:53:50 thx :) Sep 06 13:54:58 after luci trashed my router - I was sceptical. but I'm coming around :) Sep 06 13:57:23 xMff: is there a place with info on dependence? Sep 06 13:57:45 (like a directory option that depends on a flag being true) Sep 06 14:00:46 you can put such a thing in the directory option: Sep 06 14:00:46 option depends '=true' Sep 06 14:02:46 ta Sep 06 14:03:06 blogic: ping Sep 06 14:05:47 blogic: seems that the this fix https://dev.openwrt.org/cgi-bin/trac.fcgi/changeset/12465/trunk/package/base-files/files/sbin/usb-storage isn't enough. if i connect a usb pen drive i get this: http://openwrt.pastebin.com/d2de8e607 Sep 06 14:07:08 http://openwrt.pastebin.com/d307e9b4d Sep 06 14:08:07 manual mount from the command line and via /etc/config/fstab works Sep 06 14:09:17 frogonwheels: /lib/uci/schema/default/ddns does such a thing for the ip_source option Sep 06 14:11:05 xMff: what about an 'enumeration' ? Sep 06 14:11:23 see: https://dev.leipzig.freifunk.net/trac/browser/ff-luci/trunk/libs/uvl/root/lib/uci/schema/default/ddns#L123 Sep 06 14:12:40 or if you wan't a kind of dynamically enum whose values are derived from another config/section (like network interfaces) you can use "valueof" Sep 06 14:16:31 what about if I wan the same enum for 40 different options? Sep 06 14:16:52 (at the moment I'm making use of vim to generate each one :)) Sep 06 14:17:26 xMff: can I make it the combination of 2 sections? Sep 06 14:17:35 (for valueof) Sep 06 14:22:45 hmm.. that's probably enough for tonight. Sep 06 14:50:08 re, sry was afk Sep 06 14:50:41 frogonwheels: you can use 2x valueof without problems Sep 06 15:06:09 Yanira: ok, i just noticed aswell Sep 06 15:06:17 Yanira: i'll get it fixed today Sep 06 15:06:28 :) Sep 06 15:06:36 :) Sep 06 15:08:50 blogic: can you include a zone for wifi in the default config? Sep 06 15:09:42 blogic: and there is a typo in the conf, somewhere the "proto" option is misspelled as "protocol" (caught by validiation) Sep 06 15:12:25 xMff: you have svn commit rights ? Sep 06 15:15:32 blogic: nope Sep 06 15:15:59 ah Sep 06 15:16:04 well you need it i guess Sep 06 15:16:10 i'll see what i can do :) Sep 06 15:16:15 thanks Sep 06 15:21:31 Ok... doing a global build of everything in openwrt's feeds http://rafb.net/p/SOYCae60.html and http://rafb.net/p/RkwRzA98.html the first is a pkg called numpy and the second was gnome-python ish... Sep 06 15:22:11 numpy seemed to fail because I have g77 installed... Sep 06 15:22:52 ie... it seemed to use it. Sep 06 15:23:32 my checkout is now a couple days old... but I am just trying to find the packages that don't build. Sep 06 15:24:10 on a p3/866 it is taking a real long time too! Sep 06 15:26:41 I am up to 984 packages from all 3 feeds... but I intend to make the info available to help out. Sep 06 15:59:44 ok... in the end... it said the lib libwnck-1.so couldn't be found... but in trunk/staging_dir/i386/usr/lib I see libwnck-1.so.22.3.8 linwnck-1.so.22 and libwnck-1.la but no symbolic link of libwnck-1.so to libwnck-1.so.22... Sep 06 16:37:16 and tehe other module from gnome-python-desktop, the rsvg module also fails... missing pycairo.h here...http://rafb.net/p/qPRPKa80.html Sep 06 17:56:07 cyrus * r12542 /trunk/feeds.conf.default: feeds: Switched to LuCI stable branch Sep 06 23:56:22 xMff: ping Sep 06 23:57:36 frogonwheels: pong Sep 06 23:58:52 some questions: Sep 06 23:59:09 can I add an extra option to a 'valueof' list Sep 06 23:59:35 and how do I specify 'auto' or ipaddress for an option Sep 06 23:59:37 not directly yet Sep 07 00:00:07 you can create a dummy section/enum/option and reference that with valueof Sep 07 00:00:44 and the second one isn't supported either :-/ Sep 07 00:01:02 you can resort to regexpvalidators for now, or simply mark the option as 'string' Sep 07 00:01:28 but I will put those two on my list Sep 07 00:05:21 any syntax ideas? Sep 07 00:08:31 for the valueof problem I'm thinking about a combined enum / valueof Sep 07 00:09:24 an enum variable with the extra options as enum members and a valueof to complete the set Sep 07 00:12:31 frogonwheels: what about this? http://pastebin.com/m57e5c014 Sep 07 00:15:20 and the thing with auto or ipaddr, this is imho up to the processing app/script... so no value means auto and when option is set than it must validate as ipaddr Sep 07 00:15:36 so you get either nothing or a valid address Sep 07 00:59:08 xMff: yeah I ca ndo that for the host=dynamic Sep 07 01:00:38 I have just checked in the combined valueof / enum variant Sep 07 01:00:47 so it's legal to mix both now Sep 07 01:00:51 cool. Sep 07 01:01:04 simple and effective Sep 07 01:01:49 xMff: I asked about re-using an enum yesterday. possibly lost in other questions.. Sep 07 01:02:36 xMff: I have a tristate yes/no/auto - for about 50 options within one section (there's nothing else in that section) Sep 07 01:02:45 for reusing I would suggest a dummy enum somewhere which you can reference with valueof Sep 07 01:03:25 dummy section are valid as long as you don't mark them as required Sep 07 01:03:52 hmm yes, no, autp Sep 07 01:04:16 Ok - I'm still not sure how valueof distinguishes between current values (like the firewall zones) Sep 07 01:04:21 .. and enumeration options. Sep 07 01:04:30 xMff: the problem is they have defaults. Sep 07 01:04:42 xMff: so some default to 'yes', some to 'no' and some to 'auto' Sep 07 01:05:15 ah ic Sep 07 01:07:19 for enums there's a "option default true" Sep 07 01:07:47 but I will add a new "option default 'value' to variable sections Sep 07 01:07:53 xMff: It's ok - I've got the enum repeated for each of the 50 (or so) options. Sep 07 01:07:56 (yeay for vim) Sep 07 01:08:10 hehe Sep 07 01:08:21 I haven't put the default in though. Sep 07 01:08:40 I still don't see how the valueof works for a dummy enum. Sep 07 01:08:50 mom Sep 07 01:09:12 I'll post the section - wait Sep 07 01:09:28 k Sep 07 01:10:42 http://pastebin.com/d67a5a9ac Sep 07 01:17:49 frogonwheels: what about this? http://pastebin.com/m434b6b7d Sep 07 01:25:48 that'd work. Sep 07 01:26:28 okay, the default options for variables are not defined yet, but I'll implement it in a few minutes Sep 07 01:27:44 cool - I'll leave it in my todo section. Sep 07 01:28:12 I've implemented the blank host thing Sep 07 01:28:23 okay Sep 07 01:30:51 xMff: oh sh*t this next bit doesn't fit :| Sep 07 01:31:10 I think I need to find another way of specifying in my config. Sep 07 01:31:29 hmm too complex structure? Sep 07 01:31:44 perhaps you should split up your asterisk config? Sep 07 01:32:05 http://pastebin.com/d68929f90 Sep 07 01:32:17 xMff: problem is a lot of it is related. Sep 07 01:32:23 xMff: especially once you get into dialplans Sep 07 01:32:35 how should I specify this? Sep 07 01:32:59 I've used the option name as the extension # Sep 07 01:33:08 ahh Sep 07 01:33:18 you can mark whole sections as "dynamic" Sep 07 01:33:29 all not specified options are entirely free-formed then Sep 07 01:34:17 xMff: I'm not sure how to specify the rhs then Sep 07 01:34:31 so if a option is encountered which does not have a definition, then it is ignored by the validation Sep 07 01:34:33 rhs ? Sep 07 01:34:36 these bits are my own internal thing - not directly related to a single option Sep 07 01:34:59 option '1001' 'voice:1001@default' Sep 07 01:35:12 within 'dialplan' 'internal' Sep 07 01:35:39 the 'internal' is an important grouping (it groups a dialplan 'context') Sep 07 01:36:12 this means that extenaion 1001 in 'internal' context calls voicemailbox 1001@default Sep 07 01:36:47 and you problem are the numeric options? Sep 07 01:37:22 or the fact that you need the internal section? Sep 07 01:37:36 well my problem is the the external grouping is important, Sep 07 01:37:49 tying it to an extenion is important, Sep 07 01:38:03 as well as the different options (voice/saytime/conference) each with their own parameters Sep 07 01:39:31 I'm not sure how to specify it in a way that presents the user with all the information Sep 07 01:40:14 I could make it freeform, but then I can't prompt the user with the 'voice' bit and the argument for the 'voice' bit Sep 07 01:41:11 hm Sep 07 01:41:42 problem is, you have another kind of format inside the values Sep 07 01:41:58 but try to resolve all that into uci would be very hard Sep 07 01:42:10 I'm happy to change my format. Sep 07 01:42:21 but still can't think of how to contain that information. Sep 07 01:43:02 can you write custom bits of code for the web page? Sep 07 01:43:48 you can make those "number-options" to a anonymous section and resolve the key:value format into option assignments within those sections Sep 07 01:43:59 sure, you can write custom code Sep 07 01:44:05 thats no problem et all Sep 07 01:44:22 you can even define custom lua functions as validators for an option Sep 07 01:44:28 or shell scripts Sep 07 01:44:34 or regexps Sep 07 01:46:23 but I guess, its simplier to just leave at freeformed for now and do the "integrity check" of the values on a higher level, because I guess you have to take some other values into account as well Sep 07 01:46:31 *leave it Sep 07 01:47:32 but you have always the option to separate the asterisk config into several parts, e.g. one for the common config, one for the modules, one for the dialplan etc. Sep 07 01:48:02 I could imagine that this is useful for packaging purposes too Sep 07 01:48:38 so you can update you asterisk, renew the daemon config but leave the dialplan as-is Sep 07 01:49:37 do you have a more complex example of such a dialplan ? Sep 07 01:52:55 xMff: Not really -that's about as complex as it gets - and I'm thinking this is similar to custom firewall zone rules. Sep 07 01:53:13 ah okay Sep 07 01:53:20 xMff: If I need to change how this is specified, I'd prefer to do it now. Sep 07 01:53:42 can such a number option contain multiple key:value pairs? Sep 07 01:54:08 e.g.: option '1001' 'voice:1001@default,blah:foo' Sep 07 01:54:15 xMff: the idea is that each number only points to one key:value Sep 07 01:54:20 okay Sep 07 01:54:37 mom, I'll hacking together an example Sep 07 01:54:38 xMff: complex dialplans would be done by #including a separate file Sep 07 01:55:10 And then 'including' the contexts from the #included file. Sep 07 01:55:33 thats the include option then` Sep 07 01:55:34 ? Sep 07 01:55:34 xMff: btw, the option 'include' can be one comma separated list, or multple 'include' options Sep 07 01:55:56 uci now has a native list datatype Sep 07 01:55:58 well the include is including the dial context, not the file Sep 07 01:56:09 either way works. Sep 07 01:56:17 you can write it as Sep 07 01:56:17 list include blah Sep 07 01:56:17 list include foo Sep 07 01:56:17 ... Sep 07 01:56:21 okay Sep 07 01:56:43 oh. ok Sep 07 01:56:56 I'll have to check that out. Sep 07 01:57:20 when you do config_get from the shell on a list value you will get the values space separated Sep 07 01:57:37 so suitable for using in a for blah in $foo loop too Sep 07 01:57:58 xMff: and of course I made it commas - but spaces are ok - I'll add that in. Sep 07 02:01:17 myidea for dialplan: http://pastebin.com/m5f895398 Sep 07 02:01:39 http://pastebin.com/d5ef499db Sep 07 02:03:15 hm Sep 07 02:04:35 problem with yours is that you can have multiple contexts, all with the same extensions. Sep 07 02:04:46 so 108 can exist in multiple different dialplan contexts. Sep 07 02:04:50 (and it needs to be unique) Sep 07 02:06:08 xMff: and by having different uci types, I can specify the values available. Sep 07 02:06:29 hmm the uniquity of the number is assured in my variant cause uci won't accept multiple sections with the same name Sep 07 02:06:56 xMff: yeah - but you NEED to have the same number in multiple contexts Sep 07 02:06:57 and you could add another option which references the corresponding dialplans Sep 07 02:07:12 or contexts Sep 07 02:07:21 but would benumber-centric then Sep 07 02:08:31 hmm. Sep 07 02:09:14 so in practice you would loop over the dialplan_number section type and add the values to each context defined there Sep 07 02:09:37 I actually use config_load Sep 07 02:09:58 so it uses config_cb() Sep 07 02:10:29 you could do: Sep 07 02:10:29 config_foreach section_cb dialplan_number Sep 07 02:10:50 parsing it isn't the problem - I can do that now. Sep 07 02:11:01 the config_load asterisk loops over all options Sep 07 02:11:25 .. and I just handle them, and make lists and all sorts of stuff. Sep 07 02:11:41 hm Sep 07 02:11:42 If I can work out a format, I can work out how to parse it :) Sep 07 02:12:05 how do you assemble the contexts? Sep 07 02:12:18 are those values written to a file or stored as lists? Sep 07 02:12:39 xMff: a couple of ways.. stored as lists.. Sep 07 02:12:43 k Sep 07 02:12:58 xMff: and stored as a list of sections, and then stored as values Sep 07 02:13:15 anyway - the point is, i'm not worried about the how - I can handle the how. Sep 07 02:13:43 If I can get the format nailed down so that it's as friendly on the front end as possible, then that's the trick. Sep 07 02:14:42 the best way to achive this is to make the format as clean as possible and then tweak the frontend code to do the integrity stuff etc. Sep 07 02:15:40 so with validation you can verify that the actual values are sane somehow and in the frontend you do the whole cross-referencing to present fancy dropdownlists etc. Sep 07 02:16:39 and if you can't represent certain parts in validation schemes because they're too complex than simply mark them as free formed Sep 07 02:17:01 imho Sep 07 02:17:47 For example in network config pages like dhcp leases we include the addresses currently in the arp cache Sep 07 02:18:06 and they are not defined anywhere Sep 07 02:19:19 yeah - but if I can arrange the config to make validation simpler, then I should do it. Sep 07 02:19:32 true too Sep 07 02:19:56 xMff: does a config have to have options? Sep 07 02:20:20 nope, the only required part is a package statement Sep 07 02:20:27 xMff: oh - and how do you specify a list in the spec? Sep 07 02:20:48 type=list -> true list Sep 07 02:21:12 type=lazylist -> option bla or list bla, option is treated as one-element-list Sep 07 02:21:33 option type ... Sep 07 02:22:47 and for "pseudo" lists, e.g. options with multiple values separated by space you can say: Sep 07 02:22:47 option multval true Sep 07 02:22:59 *multival Sep 07 02:23:39 the multival is a hack to ease the transition to uci lists Sep 07 02:23:45 How about this (2 options) to add a voicebox to a context? http://pastebin.com/d36fe250d Sep 07 02:24:17 xMff: so option multival true could be on an enum or listof Sep 07 02:25:05 hmm yes, should work Sep 07 02:25:11 if not, I'll add it Sep 07 02:25:20 which one would be the best for the 'dialplanvoice' example where 'context' would be any of the defined 'dialplan' Sep 07 02:25:56 This'll be a good example spec when it's finished :) Sep 07 02:26:10 btw, my asteriskuci script is close to 1500 lines long! Sep 07 02:26:18 damn... Sep 07 02:26:24 hehe Sep 07 02:27:03 so which of those options above (pastebin) would be better do yo uthink? Sep 07 02:27:20 actually, I think that last one will work. Sep 07 02:27:25 jep me too Sep 07 02:27:45 hmm.. I'll leave the old method in - but not specify it. Sep 07 02:28:05 for the context thing: Sep 07 02:28:05 option type list Sep 07 02:28:05 option valueof asterisk.dialplan Sep 07 02:28:22 option type lazylist Sep 07 02:28:25 isbetter Sep 07 02:29:34 then you can write: Sep 07 02:29:34 list context internal Sep 07 02:29:34 list context external Sep 07 02:29:34 list context somewhere_else Sep 07 02:30:37 and each of the values "internal", "external", "somewhere_else" will be checked against the set of available asterisk.dialplan section names Sep 07 02:31:20 or if you just have one context reference you can write: Sep 07 02:31:20 option context internal Sep 07 02:31:27 that's waht lazylist is for Sep 07 02:36:52 . Sep 07 02:43:13 *phew* for backups Sep 07 02:43:27 I managed to overwrite a bunch of stuff I'd done to the asteriskuci script. Sep 07 02:43:47 bad Sep 07 02:44:06 but I'd backed up when I finished the work - so nothing lost Sep 07 02:44:49 and I just manged it to segfault uci Sep 07 02:45:13 ore lua Sep 07 02:45:18 not sure yet Sep 07 02:52:57 I gotta do some fatherly things now :) Sep 07 02:53:05 I've coppied all your usefull tips into a text file Sep 07 02:53:22 okay, I'll need to take some sleep ;) Sep 07 02:56:01 but thanks, I got some practical tipps from you as well Sep 07 02:56:13 option default is now in trunk **** ENDING LOGGING AT Sun Sep 07 02:59:57 2008