chmod +x /etc/hal/device.d/fstab-update.hal ... cool!

5 posts

Maybe this is old news, but if you do that on Debian with udev+hal, and you plug in an USB storage device, that script will automagically create a new directory in /mnt for the device and mount it.

That's uber-cool for me, because sometimes devices change from sdaxx to sdbxx and other stuff and it's a PITA... but this way everyone's happy.

Note: this is dangerous! if the script goes crazy and munches your /etc/fstab, you'll want to have a backup around...
The sh script in /etc/hal/device.d/fstab-update.hal is depreciated, it's better to use /usr/sbin/fstab-sync (which also comes with hal).

Run this to enable it:
ln -s /usr/sbin/fstab-sync /etc/hal/device.d/fstab-sync.hal && chmod a-x /etc/hal/device.d/fstab-update.hal
should the chmod be a+x ?

edit: nm i see it now Smile
No. fstab-update (the old sh script) and fstab-sync (the new C version) basically do the same thing and are mutually exclusive. Trying to use them both at the same time might be bad juju.
Even cooler! I see it has a better naming-scheme.

5 posts