Find out major & minor of ttys0: ls -l /dev/ttyS0
Should result in something like:
crw-rw---- 1 root dialout 4, 64 Mar 14 2002 /dev/ttyS0
The "4, 64" is the major (4) and minor (64) of the device. The "c" in the first position lets you know it is a character (a/k/a raw) device.
Any device name with the same properties will access the same device. You make a device name with the "mknod" command.
mknod /dev/modem c 4 64
The "c" tells it to make a character device and the "4 64" specify the major and minor respectively. That way its no longer a symbolic link but an actual device reference of its own. Note you may also need to change ownership and permissions with the chown and chmod commands to make it look like your /dev/ttySO entry.
Unfortunately I don't do dial up on Linux and am not sure you won't have the same problem. It appears something is deleting your /dev/modem symbolic link and there is no guarantee it wouldn't also delete /dev/modem if it were a character device. Anyway figure its worth a try.
P.S. It might be a good candiate for scripting since it appears to always work. You could write a short script that first does the ln then does the dialout command you're using. That way you'd still only have to type one command.
Last edited by MensaWater; 01-07-2006 at 10:58 AM.
|