Skip to content

Commit

Permalink
Fix swap partitions missing from fstab
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Christian Hofstaedtler committed Dec 19, 2011
1 parent 20674b2 commit aeb66be
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion 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"
5 changes: 5 additions & 0 deletions scripts/grml-udev-rebuildfstab
Expand Up @@ -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)
Expand Down

0 comments on commit aeb66be

Please sign in to comment.