From aeb66bede48f3c46e5fb756be2a4c9774d3154b0 Mon Sep 17 00:00:00 2001 From: Christian Hofstaedtler Date: Mon, 19 Dec 2011 12:42:47 +0100 Subject: [PATCH] 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. --- debian/grml-udev-config.grml-blockdevices.udev | 2 +- scripts/grml-udev-rebuildfstab | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) 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) -- 2.1.4