public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Getting udev to create tun devices
@ 2006-02-07 12:48 Robin Atwood
  2006-02-07 13:46 ` Holly Bostick
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Robin Atwood @ 2006-02-07 12:48 UTC (permalink / raw
  To: gentoo-user

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.
-- 
----------------------------------------------------------------------
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



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Getting udev to create tun devices
  2006-02-07 12:48 [gentoo-user] Getting udev to create tun devices Robin Atwood
@ 2006-02-07 13:46 ` Holly Bostick
  2006-02-07 14:26   ` Robin Atwood
  2006-02-07 13:56 ` Hans-Werner Hilse
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 7+ messages in thread
From: Holly Bostick @ 2006-02-07 13:46 UTC (permalink / raw
  To: gentoo-user

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



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Getting udev to create tun devices
  2006-02-07 12:48 [gentoo-user] Getting udev to create tun devices Robin Atwood
  2006-02-07 13:46 ` Holly Bostick
@ 2006-02-07 13:56 ` Hans-Werner Hilse
  2006-02-07 14:09 ` Neil Bothwick
  2006-02-07 20:19 ` Dave Jones
  3 siblings, 0 replies; 7+ messages in thread
From: Hans-Werner Hilse @ 2006-02-07 13:56 UTC (permalink / raw
  To: gentoo-user

Hi,

On Tue, 7 Feb 2006 19:48:49 +0700
Robin Atwood <robin.atwood@attglobal.net> 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



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Getting udev to create tun devices
  2006-02-07 12:48 [gentoo-user] Getting udev to create tun devices Robin Atwood
  2006-02-07 13:46 ` Holly Bostick
  2006-02-07 13:56 ` Hans-Werner Hilse
@ 2006-02-07 14:09 ` Neil Bothwick
  2006-02-07 14:32   ` Robin Atwood
  2006-02-07 20:19 ` Dave Jones
  3 siblings, 1 reply; 7+ messages in thread
From: Neil Bothwick @ 2006-02-07 14:09 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 455 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Getting udev to create tun devices
  2006-02-07 13:46 ` Holly Bostick
@ 2006-02-07 14:26   ` Robin Atwood
  0 siblings, 0 replies; 7+ messages in thread
From: Robin Atwood @ 2006-02-07 14:26 UTC (permalink / raw
  To: gentoo-user

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



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Getting udev to create tun devices
  2006-02-07 14:09 ` Neil Bothwick
@ 2006-02-07 14:32   ` Robin Atwood
  0 siblings, 0 replies; 7+ messages in thread
From: Robin Atwood @ 2006-02-07 14:32 UTC (permalink / raw
  To: gentoo-user

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



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [gentoo-user] Getting udev to create tun devices
  2006-02-07 12:48 [gentoo-user] Getting udev to create tun devices Robin Atwood
                   ` (2 preceding siblings ...)
  2006-02-07 14:09 ` Neil Bothwick
@ 2006-02-07 20:19 ` Dave Jones
  3 siblings, 0 replies; 7+ messages in thread
From: Dave Jones @ 2006-02-07 20:19 UTC (permalink / raw
  To: gentoo-user

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



^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-02-07 20:29 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-02-07 12:48 [gentoo-user] Getting udev to create tun devices Robin Atwood
2006-02-07 13:46 ` Holly Bostick
2006-02-07 14:26   ` Robin Atwood
2006-02-07 13:56 ` Hans-Werner Hilse
2006-02-07 14:09 ` Neil Bothwick
2006-02-07 14:32   ` Robin Atwood
2006-02-07 20:19 ` Dave Jones

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox