From: Christian Hofstaedtler Date: Mon, 19 Dec 2011 11:42:47 +0000 (+0100) Subject: Fix swap partitions missing from fstab X-Git-Tag: v0.0.10~1 X-Git-Url: http://git.grml.org/?p=grml-udev-config.git;a=commitdiff_plain;h=aeb66bede48f3c46e5fb756be2a4c9774d3154b0 Fix swap partitions missing from fstab 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. --- diff --git a/debian/grml-udev-config.grml-blockdevices.udev b/debian/grml-udev-config.grml-blockdevices.udev index 1fc7f96..8f9360f 100644 --- a/debian/grml-udev-config.grml-blockdevices.udev +++ b/debian/grml-udev-config.grml-blockdevices.udev @@ -1,2 +1,2 @@ # 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" diff --git a/scripts/grml-udev-rebuildfstab b/scripts/grml-udev-rebuildfstab index 6ff1b18..71e7f36 100755 --- a/scripts/grml-udev-rebuildfstab +++ b/scripts/grml-udev-rebuildfstab @@ -226,6 +226,11 @@ done # 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)