LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva
User Name
Password
Mandriva This Forum is for the discussion of Mandriva (Mandrake) Linux.

Notices


Reply
  Search this Thread
Old 08-05-2005, 05:44 PM   #1
blubery
LQ Newbie
 
Registered: Jun 2004
Location: Seattle
Distribution: Mandrake 10.1
Posts: 5

Rep: Reputation: 0
How to add pseudo-terminals to /dev directory (Mandrake 10.1 & udev)


I need to make use of an application that makes use of pseudo-terminals. For whatever reason (I am still pretty new to Linux), my Mandrake 10.1 installation does not put any pseudo-terminal files in the /dev directory when it boots up.

I can use do something like this:

su to root
cd /dev
mkdir pty
mknod pty/m0 c 2 0
mknod pty/s0 c 3 0
ln -s pty/m0 ttyp0
ln -s pty/s0 ptyp0
chmod a+w pty/m0 pty/s0

to creat a pseudo-terminal master/slave file pair in my /dev directory. But it will only remain there until I reboot, because, during the boot process, the contents of the /dev directory are made anew again.

Under Mandrake 10.1, the makedev command takes its input from the configuration files that it finds in
the /etc/makedev.d directory. I was thinking, at one point, that adding a configuration file
to this directory that would cause makedev to add a bank of pseudo-terminal files in my /dev directory would a reasonable approach for fixing my problem, but, again, whatever changes I would make to my /dev directory via executing the makedev command would disappear upon re-boot.

More recently, I've looked at my /etc/rc.d/init.d/udev file. This is a "simple" script file that does gets executed as part of the boot process. It appears to include some places where I could add a few lines of code that would result, during boot-up, in a bank of pseudo-terminal files being generated in my /dev directory. Can anybody tell me if this is the preferred way to solve my problem? And if it is the preferred way, can you point me to some documentation that will explain what I will need to include in the additional lines of code that I add to my /etc/rc.d/init.d/udev file?

Many thanks!!

Martin
 
Old 08-06-2005, 01:46 PM   #2
linuxLuser
Member
 
Registered: Jan 2005
Distribution: Gentoo
Posts: 111

Rep: Reputation: 16
Hmmm...well, I would love to help more than I think I can, but I'll show you what I dug up.

This seems to be a short thread that might shed some light on what you're trying to do.

I tried looking up how to add static device files to /dev the udev way. I don't know if there is a way. devfs is supposed to get a signal that an application is requesting a certain device, then it calls udev and udev looks through it's rules and whatnot and makes a device accordingly. That's the picture. I suppose you should make sure that the devices you need are listed in the /etc/udev/rules.d/50-udev.rules file. Also check /etc/udev/udev.conf for any configuration options.

I wish I could help more but maybe you'll just have to tinker around a little. I wouldn't mess around with startup scripts if I were you, though. But if you really have to and it does the job, then, hey, what can I say

-- the duDEMan DavE

PS
This is my 100th post on linuxquestions.org! Whoo hoo! Cheer for me!CHEER FOR ME!
I think only three or four times have I myself started a new thread asking for help. I enjoy trying to help other people because I can learn a lot of new things.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Regarding Pseudo tty, Pseudo terminals ? mqureshi Programming 0 07-30-2005 11:51 AM
how to tell udev to make a dev jimdaworm Slackware 10 08-13-2004 08:12 AM
udev, /dev & alsa tobyl Slackware 7 07-09-2004 09:13 AM
hardware & the /dev directory? e1000 Linux - Hardware 4 01-03-2004 05:22 AM
managing pseudo terminals in an ssh session kirkhamster1 Linux - Newbie 1 10-08-2003 01:26 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Mandriva

All times are GMT -5. The time now is 10:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration