Re: [gentoo-user] Getting udev to create tun devices

2006-02-07 Thread Holly Bostick
Robin Atwood schreef:
 I need a device /dev/net/tun to use with hercules. tun is defined in
 the kernel and the traditional mknode method works fine but I loose
 it after a reboot.  After a bit of research I added:
 
 # tun device for hercules KERNEL==tun, NAME=net/tun
 
 to /etc/udev/50-udev.rules but it doesn't seem to hack it. :( Anybody
 any ideas?
 
 TIA -Robin.

Hey, Robin,

I don't know what, if anything, is wrong with your rule, but I'm almost
sure you're adding it to the wrong file.

(from a Linux Format article about udev):

-
Making up the rules
The rules are contained in files in /etc/udev/rules.d. The default
file is usually called 50-udev.rules. Don’t change this file as it
could be overwritten when you upgrade udev. Instead, write your
rules in a file called 10-udev.rules. The low number ensures it
will take priority over any definitions in the default file.
-

Basically, the 50-udev.rules file is the system default rules (managed
by Portage, in that if udev is updated, this file will also be updated),
local changes should go in 10-udev.rules (which is unmanaged by Portage,
I believe).

Anyway, it's possible that not using a higher-priority rules file to
create this rule is part of your problem, either because another rule in
the 50 file overrides it, or because your rule is being removed
everytime you update udev, which has been happening a lot lately.

Hope this helps until somebody with more familiarity with that
particular device and custom udev rules comes along.

Holly


-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Getting udev to create tun devices

2006-02-07 Thread Hans-Werner Hilse
Hi,

On Tue, 7 Feb 2006 19:48:49 +0700
Robin Atwood [EMAIL PROTECTED] wrote:

 I need a device /dev/net/tun to use with hercules. tun is defined in the 
 kernel and the traditional mknode method works fine but I loose it after a 
 reboot.

That's pretty normal. I think the application using the tun device is
supposed to create them by issueing a few (?) syscalls. FYI, openvpn
can do this and can create persistent tun-Sockets. you may want to
emerge openvpn and enter the following in /etc/conf.d/local.start:
---snip
openvpn --mktun --dev tun0
---snip
Udev should then take care of creating the device.

-hwh
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Getting udev to create tun devices

2006-02-07 Thread Neil Bothwick
On Tue, 7 Feb 2006 19:48:49 +0700, Robin Atwood wrote:

 I need a device /dev/net/tun to use with hercules. tun is defined in
 the kernel and the traditional mknode method works fine but I loose it
 after a reboot.

The device is created when you load the tun module. you don;t need a udev
rule unless you want to change its name, ownership or permissions.


-- 
Neil Bothwick

I do not fear computers, I fear the lack of them - Asimov


signature.asc
Description: PGP signature


Re: [gentoo-user] Getting udev to create tun devices

2006-02-07 Thread Robin Atwood
On Tuesday 07 February 2006 20:46, Holly Bostick wrote:
 Robin Atwood schreef:
  I need a device /dev/net/tun to use with hercules. tun is defined in
  the kernel and the traditional mknode method works fine but I loose
  it after a reboot.  After a bit of research I added:
 
  # tun device for hercules KERNEL==tun, NAME=net/tun
 
  to /etc/udev/50-udev.rules but it doesn't seem to hack it. :( Anybody
  any ideas?
 
  TIA -Robin.

 Hey, Robin,

 I don't know what, if anything, is wrong with your rule, but I'm almost
 sure you're adding it to the wrong file.

 Hope this helps until somebody with more familiarity with that
 particular device and custom udev rules comes along.

Thanks for the input, but it didn't make any difference.
-Robin.
-- 
--
Robin Atwood.

Ship me somewheres east of Suez, where the best is like the worst,
 Where there ain't no Ten Commandments an' a man can raise a thirst
 from Mandalay by Rudyard Kipling
--








-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Getting udev to create tun devices

2006-02-07 Thread Robin Atwood
On Tuesday 07 February 2006 21:09, Neil Bothwick wrote:
 On Tue, 7 Feb 2006 19:48:49 +0700, Robin Atwood wrote:
  I need a device /dev/net/tun to use with hercules. tun is defined in
  the kernel and the traditional mknode method works fine but I loose it
  after a reboot.

 The device is created when you load the tun module. you don;t need a udev
 rule unless you want to change its name, ownership or permissions.

OK, I have to lead the module first. All is clear... :)

Cheers...
-Robin.
-- 
--
Robin Atwood.

Ship me somewheres east of Suez, where the best is like the worst,
 Where there ain't no Ten Commandments an' a man can raise a thirst
 from Mandalay by Rudyard Kipling
--








-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Getting udev to create tun devices

2006-02-07 Thread Dave Jones
Robin Atwood wrote on 02/07/06 13:48:
 I need a device /dev/net/tun to use with hercules. tun is defined in the 
 kernel and the traditional mknode method works fine but I loose it after a 
 reboot.  After a bit of research I added:

 # tun device for hercules
 KERNEL==tun, NAME=net/tun

 to /etc/udev/50-udev.rules but it doesn't seem to hack it. :(
 Anybody any ideas? 

I have this in my /etc/udev/rules.d/10-udev-rules

# N.B.: Using := prevents later rules modifying parameters,
# 50-dev-rules will reset device permissions to 600.

KERNEL==tun, NAME=net/%k,MODE:=666

If you're not running hercules as root, you will need at least file mode
660. Also, you should set /usr/bin/hercifc suid, otherwise hercules will
not be able to create the tun device for you.

Cheers, Dave
-- 
gentoo-user@gentoo.org mailing list