# devfsd problem

## jay

Hi folks!

After adding a scsi adapter to my existing gentoo system i got the stuff finally working. But now I have problems with the drive arrangement under devfsd. Before the installation /dev/cdroms/cdrom0 was my ide 40x cdrom and the symlink from /dev/cdrom pointed to it.

Now  /dev/cdroms/cdrom0 is my scsi burner (host0, bus0, target3, lun0) and things get messed up...  :Sad: 

What I want: /dev/cdroms/cdrom0 should be again my old ide drive and the scsi burner should be recognized as /dev/cdroms/cdrom1

I was googling around and checking also man devfsd.conf but there were no good examples (maybe I'm too stupid to understand that). Does anybody know what I have to add to the devfs.conf ?

This is currently what I have in devfsd.conf:

```

# Create /dev/cdrom for the first cdrom drive

LOOKUP      ^cdrom$          CFUNCTION GLOBAL mksymlink cdroms/cdrom0 cdrom

REGISTER    ^cdrom/cdrom0$   CFUNCTION GLOBAL mksymlink $devname cdrom

UNREGISTER  ^cdrom/cdrom0$   CFUNCTION GLOBAL unlink cdrom

```

----------

## lunatc

You can try this:

```

LOOKUP      ^cdrecorder$     CFUNCTION GLOBAL mksymlink cdroms/cdrom0 cdrecorder

REGISTER    ^cdrom/cdrom0$   CFUNCTION GLOBAL mksymlink $devname cdrecorder

UNREGISTER  ^cdrom/cdrom0$   CFUNCTION GLOBAL unlink cdrecorder

LOOKUP      ^cdrom$          CFUNCTION GLOBAL mksymlink cdroms/cdrom1 cdrom

REGISTER    ^cdrom/cdrom1$   CFUNCTION GLOBAL mksymlink $devname cdrom

UNREGISTER  ^cdrom/cdrom1$   CFUNCTION GLOBAL unlink cdrom 

```

I think that after that your burner will be /dev/cdrecorder and your cdrom, /dev/cdrom

(Please try and tell me if I'm wrong!   :Rolling Eyes: 

----------

## jay

Thanks lunatc!

How could I be so stupid...it was just a typo (is this also in the default file?) that messed all things up.

```

# 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

```

As you can see from my working code above it should be in the second and third row ^cdroms and not ^cdrom - now the symlinks are working perfectly.

There is no /dev/cdroms/cdrom1 in my situation, although this should be (..?), so I adressed the burner directly by:

```

# Create /dev/cdrw for the first cdrom on the scsi bus

# (change 'sr0' to suite your setup)

LOOKUP      ^cdrw$           CFUNCTION GLOBAL mksymlink sr0 cdrw

REGISTER    ^sr0$           CFUNCTION GLOBAL mksymlink $devname cdrw

UNREGISTER  ^sr0$           CFUNCTION GLOBAL unlink cdrw

```

----------

