On 3/14/07, Carlo Calica <[EMAIL PROTECTED]> wrote: > On 3/14/07, Lucas C. Villa Real <[EMAIL PROTECTED]> wrote: > > > > I don't like too much to have more config files spread over > > /System/Settings. What about moving everything to these files (again), > > writing simple pre/post tasks as functions inside them? Another option > > is to enhance NetworkOptions like this: > > > > eth0_pre_hook() { > > echo "hi" > > } > > eth0_post_hook() { > > echo "bye" > > } > > eth0_IP=10.0.202.21 > > ... > > > > I thought of that but I was worried about scope. My sh scripting is > rusty. Ok, after a quick test the scope isn't a problem. > > > On 3/13/07, Hisham Muhammad <[EMAIL PROTECTED]> wrote: > > > > If you feel it's the solution, go for it. As usual, my only concern is > > that adding features to boot-related scripts adds code potentially > > slowing the boot process down. > > I think we should optimize for the noop case. Which is better, a file > test ( [ -f /path/foo ] ) or searching the path? The file test is a > bash builtin so it should be cheap. Searching the path should be a > file test for each path entry. During boot, PATH is only /S/L/Exec > and /S/L/Tasks, right?
Right. WRT performance, I believe functions instead of separate files are faster, actually. [ "`type -t bla`" = "function" ] will do no disk access to find a function (test and type are builtins). If the function is not there it will run through the PATH, but that is hashed, I think. > I guess I'd prefer a single config file. Slightly slower but more > convenient. We could include empty functions for eth0. The would > document them as well. Makes sense. -- Hisham _______________________________________________ gobolinux-devel mailing list gobolinux-devel@lists.gobolinux.org http://lists.gobolinux.org/mailman/listinfo/gobolinux-devel