swap partitions get ID_FS_USAGE='other' instead of 'filesystem'.
This change hands the filter for ID_FS_USAGE to grml-udev-rebuildfstab,
to the point right before adding the new entries. This way cleanup
should work always, and we get swap partitions, too.
# regenerate /etc/fstab for new/removed devices:
-ENV{ID_FS_USAGE}=="filesystem", ACTION=="add|change|remove", SUBSYSTEM=="block", RUN+="/etc/udev/scripts/grml-udev-rebuildfstab"
+ACTION=="add|change|remove", SUBSYSTEM=="block", RUN+="/etc/udev/scripts/grml-udev-rebuildfstab"
# if entry is already present ignore it
stringinfile $device $TMPFILE && bailout 0
+if [ "$ID_FS_USAGE" != "filesystem" -a "$ID_FS_TYPE" != "swap" ]; then
+ # blockdevice in question won't be mountable in this case
+ bailout 0
+fi
+
options=noauto,user,dev,suid,exec
case $ID_FS_TYPE in
ntfs)