Date: Fri, 2 Jul 2010 16:05:31 +0200 From: =?ISO-8859-1?Q?Samuel_Mart=EDn_Moro?= <faust64@gmail.com> To: freebsd-questions@freebsd.org Subject: Running a script after a device's been plugged Message-ID: <AANLkTik31MqFELyyP64xNwMqmLJhGjzzShUzrItYv_ey@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Hi, In order to simplify our managing scripts, my project manager would like to manage all devices (USB and serial) with the same name pattern (cuaa*, cuad*, ... whatever). He explained me he wants to keep cuaa0 and cuaa1, and then link each /dev/da`n` to /dev/cuaa`n + 2`, ... But, there is some things I'm not sure to understand: 1) I though that cuaa was used until FreeBSD7, then we had cuad, and since FreeBSD8, it would be cuaU. But one of our 7.2-RELEASE have both /dev/cuaU0 and dev/cuad0. Did I miss something? What is cuaU doing here? btw. it's my dev server, someone may have touched it. On the servers installed from my generated CDs, no /dev/cuaU* at all... 2) We also provide serial DCF77 modules, and use them with ntpd, linking them /dev/ttyd`n` to /dev/refclock-`n` What is ttyd used for? Can I assume I would use ttyd`n` only with my DCF modules, and so link them to /dev/refclock-`n`, excluding them from my cuaa`n + x` mess? Also, we would have to manage USB DCF77 modules soon; does anybody tried them? How would them be named in /dev? 3) Last but not least, how to link a device once it's plugged in, and unlin= k it once it's unplugged? We're still providing 5.4 and 6.2 releases based versions. And I do not lik= e hal. So I thought I could use /etc/devd.conf, with attach/detach directives, and their actions calling a script that would create/delete the links. Is there a cleaner way to do it? Would it be still usable in 8.x? (9.x?) Thanks for your time and advices! Samuel Mart=EDn Moro {EPITECH.} tek4 CamTrace S.A.S (+033) 1 41 38 37 60 1 All=E9e de la Venelle 92150 Suresnes FRANCE
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTik31MqFELyyP64xNwMqmLJhGjzzShUzrItYv_ey>