Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
comand line puzzle
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
lecholet
n00b
n00b


Joined: 15 Jul 2002
Posts: 39
Location: Montreal, Canada

PostPosted: Wed Dec 18, 2002 4:38 pm    Post subject: comand line puzzle Reply with quote

I dont really understand what is going on...

Code:


[root:/dev] > ll cd*
lr-xr-xr-x    1 root     root           13 Dec 18 11:32 cdrom -> cdroms/cdrom0

cdroms:
total 0
lr-xr-xr-x    1 root     root           34 Dec 31  1969 cdrom0 -> ../scsi/host0/bus0/target0/lun0/cd
lr-xr-xr-x    1 root     root           34 Dec 31  1969 cdrom1 -> ../scsi/host0/bus0/target1/lun0/cd



so okay, cdrom is already linked to cdroms/cdrom0. I want it to be link to cdroms/cdrom1 instead:

Code:

[root:/dev] > unlink cdrom
[root:/dev] > ll cd*
total 0
lr-xr-xr-x    1 root     root           34 Dec 31  1969 cdrom0 -> ../scsi/host0/bus0/target0/lun0/cd
lr-xr-xr-x    1 root     root           34 Dec 31  1969 cdrom1 -> ../scsi/host0/bus0/target1/lun0/cd



So far so good.

Code:

[root:/dev] > ln -s cdroms/cdrom1 cdrom
ln: `cdrom': File exists
[root:/dev] > ll cd*
lr-xr-xr-x    1 root     root           13 Dec 18 11:33 cdrom -> cdroms/cdrom0

cdroms:
total 0
lr-xr-xr-x    1 root     root           34 Dec 31  1969 cdrom0 -> ../scsi/host0/bus0/target0/lun0/cd
lr-xr-xr-x    1 root     root           34 Dec 31  1969 cdrom1 -> ../scsi/host0/bus0/target1/lun0/cd



euh.... What?

Yanos
Back to top
View user's profile Send private message
waverider202
Tux's lil' helper
Tux's lil' helper


Joined: 25 Sep 2002
Posts: 146
Location: Drexel University

PostPosted: Wed Dec 18, 2002 7:39 pm    Post subject: devfs Reply with quote

devfs maintains the symbolic links, so, when you delete the symlink, devfsd recreates it. What you need to do is modify your devfsd.conf file to change the link, here's a portion of mine, you change the line with LOOKUP at the begining to point to cdroms/cdrom1

# Create /dev/cdrom for the first cdrom drive
LOOKUP ^cdrom$ CFUNCTION GLOBAL mksymlink cdroms/cdrom0 cdrom
REGISTER ^cdroms/cdrom0$ CFUNCTION GLOBAL mksymlink $devname cdrom
UNREGISTER ^cdroms/cdrom0$ CFUNCTION GLOBAL unlink cdrom
_________________
:-P
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum