http://www.phys.ethz.ch/~franklin/Projects/dphys-hotplug/Logfile - done, to do author Neil Franklin, last modification see last entry near bottom copyright ETH Zuerich Physics Departement use under either modified/non-advertising BSD or GPL license 2004.11.10 Wed look how dphys-setup-[cdrom|floppy|zip] work thex do: modprobe, clean fstab, umount, rm mpoint, chgrp/chmod, new fstab look how hotplug works, in the end /etc/hotplug/usb/usb-storage is here already linked to /usr/sbin/dphys-drivemount.sh from dphys-setup-drivemount from /usr/share/dphys-setup-drivemount/usr/sbin 2004.11.11 Thu heeb dphys-drivemount.sh is old dsbg experiment, didn't work, no device anymore removed and also /etc/hotplug/usb, deinstalled dphys-setup-drivemount hotplug.functions load_drivers(), script also when module, wenn loaded it testwise plugged in iomega 80G HD, looked at logs what happens, syslog best /etc/hotplug/usb scripts only when drivers loaded, first device, unusable so we can not use /sbin/hotplug, need wrapper around it /sbin/dphys-hotplug script that calls /sbin/hotplug, then does our stuff /sbin/dphys-hotplug-usb and then /sbin/dphys-hotplug-usb-storage hotplug gives /proc/bus/usb//, /proc/bus/usb/devices gives serial /proc/scsi/usb-storage-0/1 with serial gives host* number as filename 2004.11.12 Fri variable amount mountpoints, /, when multiple partitions //part* unique / from what? user knows manufacturer, poss type, not serial nr 2004.11.24 Wed hotplug usb ACTION=add gives also DEVICE=/proc/bus/usb/002/002 sed -ne '/^T: Bus=02 .*Dev#= *3/,/^T: /{/^S: SerialNumber/p}' \ /proc/bus/usb/devices gives then S: SerialNumber=11100E00005E2A18 grep 'Serial Number: 11100E00005E2A18' /proc/scsi/usb-storage-*/* /dev/null gives then /proc/scsi/usb-storage-0/1:Serial Number: 11100E00005E2A18 grep 'Host scsi' /proc/scsi/usb-storage-0/1 gives then Host scsi1: usb-storage mount /dev/scsi/host1/bus0/target0/lun0/part1 /usb-storage works then, but needs partition differentiation for remove data is missing, so also file /var/.../002/002 with /usb-storage mountpoint name, systematic /usr--[-] reading out label work for ext2, but what with vfat which most people have? would be ideal as consistant for device, bur senseless as nobody sets it vfat can be handled by mlabel, if allways rewriting ~/.mtoolsrc u: software generic dphys-hotplug to usb/etc demux /etc/dphys-hotplug/usb.d/* then in that dphys-hotplug-usb-storage script, for each device, tests type 2004.11.25 Thu at boot no call of ${`cat /proc/sys/kernel/hotplug`}, direct call to agent either change /etc/hotplug/*.rc, or put code in /etc/hotplug/*.agent or simply ignore inserted stick when boot, pull out/reinsert works anyway dphys-hotplug started, calls /sbin/hotplug and /etc/dphys-hotplug.d/.* packaged version 20041125.161151-1, changelog: "initial release" 2004.11.26 Fri packaged version 20041126.183136-1, changelog: "added syslog levels" 2005.01.21 Fri grab problem with USB stick, does not mount with root:floppy,007 rubis test with his stick doesn't mount at all, is not even partitioned dphys-hotplug improved output (list of scripts) and debug logs packaged version 20050121.165052-1, changelog: "list script names, better logging" 2005.01.28 Fri now quite a bit of code and functionality, not just keep as internal stuff dphys-hotplug website: FAQ, INSTALL, Logfile, README, debian, index.html.en debug also added support like in dphys-hotplug-usb-storage, updated man page packaged version 20050128.173540-1, changelog: "added website, improved docs, debug like in usb.storage" 2005.02.17 Thu extended to also support /etc/dphys-hotplug.d/*-* script names packaged version 20050217.153733-1, changelog: "extended to support /etc/dphys-hotplug.d/*-* script names" 2005.02.14 Thu read article on 2.6 hotplug and udev: http://lwn.net/Articles/123932/ already does calling of random scripts from binary /sbin/hotplug looks like this program will not be needed on 2.6 systems 2006.05.12 Fri in /etc/init.d/dphys-hotplug added test for 2.4 kernel, else abort activation packaged version 20060512.134029-1, changelog: "only activate if 2.4 kernel family" 2006.05.17 Wed fixed up stdio filehandles delivered by kernel to /dev/null so that set -e can be udes in subscripts, without grep or sed failing while at it added set -e also to this script, and init.d script packaged version 20060517.154425-1, changelog: "fix up stdio filehandles delivered by kernel to /dev/null" 2006.08.11 Fri added all "packaged version ????????.??????-?, changelog:" lines --- doing: todo: bug source check cut -f bug source check "${blah}" against possible * in ${blah} data possible extensions: