LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Link /dev/mouse -> /dev/ttyS0 undone at reboot. (http://www.linuxquestions.org/questions/slackware-14/link-dev-mouse-dev-ttys0-undone-at-reboot-4175440184/)

stf92 12-05-2012 03:35 PM

Link /dev/mouse -> /dev/ttyS0 undone at reboot.
 
Hi:

I have
Code:

$ ls -l /dev/mouse
lrwxrwxrwx 1 root root 10 2012-12-05 11:33 /dev/mouse -> input/mice
$

I do
Code:

$ rm /dev/mouse
$ ln -s /dev/ttyS0 /dev/mouse
$ ls -l /dev/mouse
lrwxrwxrwx 1 root root 10 2012-12-05 11:33 /dev/mouse -> ttyS0
$

Now I reboot. The result is
Code:

$ ls -l /dev/mouse
lrwxrwxrwx 1 root root 10 2012-12-05 11:33 /dev/mouse -> input/mice
$

What is undoing the link? It happens at boot time.

kernel 2.6.21.5, Slackware 12.0

ljb643 12-05-2012 04:29 PM

The whole /dev tree is maintained by the udev system, and you can't do anything to it directly that will persist across reboots. You must use udev rules.

The /dev/mouse link is created by the rule /lib/udev/rules.d/40-slackware.rules

stf92 12-05-2012 08:54 PM

I see. However I do not change the link myself but I use pkgtool>Setup>mouse. After exiting pkgtool, /dev/mouse is pointing to /dev/ttyS0. If now, rebooting causes a udev rule to undo the link, then what is the use of pkgtool?

ljb643 12-06-2012 02:50 PM

pkgtool is useful for installing and removing packages. pkgtool can also run setup scripts. One of those setup scripts is setup.mouse, which (as you have discovered) seems to be obsolete and should have been removed from Slackware when udev was introduced. (But this is a problem with the "gpm" package in slackware, not with pkgtool itself.)

stf92 12-07-2012 05:37 PM

OK. Well, what I did to have mouse in the text consoles was to replace, in /etc/rc.d/rc.gpm, the line '/usr/sbin/gpm -m /dev/mouse -t ms3' with '/usr/sbin/gpm -m /dev/ttyS0 -t ms3'.

In this way I don't mind where /dev/mouse points to.


All times are GMT -5. The time now is 11:47 AM.