On Tue, Oct 03, 2006 at 05:49:42PM +0300, Rémi Denis-Courmont wrote: > Hello, > > On Tue, Oct 03, 2006 at 08:19:38PM +1000, Anand Kumria wrote : > > A 'modprobe 'tun' in the startup script and then checking if > > /dev/net/tun exists ought to be enough. > > AFAIK, the modprobe trick works only if udev is present. And even > then, I am not sure if it is synchronous; I don't want the script to > fail if udev is too slow to spawn the device node, postinst can simply > not afford to fail.
I'm not talking about the postinst script but the startup script. You really don't have a choice with the startup script > If udev is not there, it's actually the opposite, mknod triggers the > load of the LKM. So it looks like you have to do: modprobe tun, if udev mknod /dev/net/tun, if not Since you are worried about the time that udev might take to respond, simply doing the modprobe and then creating the device node will cover that case as well. It'll also mean that non-udev kernels which trigger the device on node creation will also work. > /dev/net/tun might be there while the module is not available. To detect > availability, you have to actually open the device; it could probably be > done too, though it would be more intricate than simply checking for the > node presence. > > I considered adding the modprobe and/or the mknod work-arounds, but my > sponsor reported it weren't such a good idea. Perhaps networking wans't their particular area of expertise - anyway, it was a good package for a first try. Cheers, Anand -- `When any government, or any church for that matter, undertakes to say to its subjects, "This you may not read, this you must not see, this you are forbidden to know," the end result is tyranny and oppression no matter how holy the motives' -- Robert A Heinlein, "If this goes on --" -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]