public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] What is "the correct way" to keep a /dev entry through reboots?
@ 2009-09-03  5:17 Walter Dnes
  2009-09-03  5:41 ` Dale
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Walter Dnes @ 2009-09-03  5:17 UTC (permalink / raw
  To: Gentoo Users List

  I recently bought a USR5637 USB dialup modem for my 2nd PC.  I chose
it because it's small, and specifically claims to support linux.
Following instructions at http://www.linux-usb.org/USB-guide/x332.html I
* recompiled the kernel with CDC(ACM) USB modem support
* tried "mknod /dev/usb/ttyACM0 c 166 0"
* woops, no /dev/usb/.  So I did "mkdir /dev/usb" and then the mknod
* I rebooted, and discovered that /dev/usb was gone

  For now I have the mkdir and mknod commands in /etc/conf.d/local/start
to recreate them at each bootup, but putting stuff in there is usually a
last resort.  Is there a "more correct" way of doing it?

  BTW, the modem works.  I ssh'd from my main machine to the 2nd
computer and dialed into my dialup ISP, and launched a w3m text browser
session.  The scarey part is that there is no modem noise to let me
know when I'm connected.  But ifconfig indicated that I now had ppp0, in
addition to lo and eth0.  Plus I went to whatismyip.org with w3m and got
an IP address that reversed DNS to my dialup provider.

-- 
Walter Dnes <waltdnes@waltdnes.org>



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

* Re: [gentoo-user] What is "the correct way" to keep a /dev entry through reboots?
  2009-09-03  5:17 [gentoo-user] What is "the correct way" to keep a /dev entry through reboots? Walter Dnes
@ 2009-09-03  5:41 ` Dale
  2009-09-03  7:04 ` Fabrice Delliaux
  2009-09-03  7:11 ` Alan McKinnon
  2 siblings, 0 replies; 4+ messages in thread
From: Dale @ 2009-09-03  5:41 UTC (permalink / raw
  To: gentoo-user

Walter Dnes wrote:
>   I recently bought a USR5637 USB dialup modem for my 2nd PC.  I chose
> it because it's small, and specifically claims to support linux.
> Following instructions at http://www.linux-usb.org/USB-guide/x332.html I
> * recompiled the kernel with CDC(ACM) USB modem support
> * tried "mknod /dev/usb/ttyACM0 c 166 0"
> * woops, no /dev/usb/.  So I did "mkdir /dev/usb" and then the mknod
> * I rebooted, and discovered that /dev/usb was gone
>
>   For now I have the mkdir and mknod commands in /etc/conf.d/local/start
> to recreate them at each bootup, but putting stuff in there is usually a
> last resort.  Is there a "more correct" way of doing it?
>
>   BTW, the modem works.  I ssh'd from my main machine to the 2nd
> computer and dialed into my dialup ISP, and launched a w3m text browser
> session.  The scarey part is that there is no modem noise to let me
> know when I'm connected.  But ifconfig indicated that I now had ppp0, in
> addition to lo and eth0.  Plus I went to whatismyip.org with w3m and got
> an IP address that reversed DNS to my dialup provider.
>
>   

I'm not positive but I think you can set it to save /dev here: 
/etc/conf.d/rc  This is the section I am thinking would be the correct one:


# UDEV OPTION:
# Set to "yes" if you want to save /dev to a tarball on shutdown
# and restore it on startup.  This is useful if you have a lot of
# custom device nodes that udev does not handle/know about.

RC_DEVICE_TARBALL="no"

I hope that helps.

Dale

:-)  :-) 



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

* Re: [gentoo-user] What is "the correct way" to keep a /dev entry through reboots?
  2009-09-03  5:17 [gentoo-user] What is "the correct way" to keep a /dev entry through reboots? Walter Dnes
  2009-09-03  5:41 ` Dale
@ 2009-09-03  7:04 ` Fabrice Delliaux
  2009-09-03  7:11 ` Alan McKinnon
  2 siblings, 0 replies; 4+ messages in thread
From: Fabrice Delliaux @ 2009-09-03  7:04 UTC (permalink / raw
  To: gentoo-user

Le Thu, 3 Sep 2009 01:17:26 -0400,
"Walter Dnes" a écrit :

> For now I have the mkdir and mknod commands in /etc/conf.d/local/start
> to recreate them at each bootup, but putting stuff in there is
> usually a last resort.  Is there a "more correct" way of doing it?

Maybe you should try to setup some udev rules which create/delete the
device node on specific kernel events (basically when the modem is
plugged/unplugged) :

http://reactivated.net/writing_udev_rules.html



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

* Re: [gentoo-user] What is "the correct way" to keep a /dev entry through reboots?
  2009-09-03  5:17 [gentoo-user] What is "the correct way" to keep a /dev entry through reboots? Walter Dnes
  2009-09-03  5:41 ` Dale
  2009-09-03  7:04 ` Fabrice Delliaux
@ 2009-09-03  7:11 ` Alan McKinnon
  2 siblings, 0 replies; 4+ messages in thread
From: Alan McKinnon @ 2009-09-03  7:11 UTC (permalink / raw
  To: gentoo-user

On Thursday 03 September 2009 07:17:26 Walter Dnes wrote:
>   I recently bought a USR5637 USB dialup modem for my 2nd PC.  I chose
> it because it's small, and specifically claims to support linux.
> Following instructions at http://www.linux-usb.org/USB-guide/x332.html I
> * recompiled the kernel with CDC(ACM) USB modem support
> * tried "mknod /dev/usb/ttyACM0 c 166 0"
> * woops, no /dev/usb/.  So I did "mkdir /dev/usb" and then the mknod
> * I rebooted, and discovered that /dev/usb was gone
> 
>   For now I have the mkdir and mknod commands in /etc/conf.d/local/start
> to recreate them at each bootup, but putting stuff in there is usually a
> last resort.  Is there a "more correct" way of doing it?
> 
>   BTW, the modem works.  I ssh'd from my main machine to the 2nd
> computer and dialed into my dialup ISP, and launched a w3m text browser
> session.  The scarey part is that there is no modem noise to let me
> know when I'm connected.  But ifconfig indicated that I now had ppp0, in
> addition to lo and eth0.  Plus I went to whatismyip.org with w3m and got
> an IP address that reversed DNS to my dialup provider.
> 

Set up a udev rule so that if udevd finds a device with that modem's serial 
number (or other other identifier you like) then it creates the node you 
specify.

Google for it.

-- 
alan dot mckinnon at gmail dot com



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

end of thread, other threads:[~2009-09-03  2:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-03  5:17 [gentoo-user] What is "the correct way" to keep a /dev entry through reboots? Walter Dnes
2009-09-03  5:41 ` Dale
2009-09-03  7:04 ` Fabrice Delliaux
2009-09-03  7:11 ` Alan McKinnon

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