Bump Standards-Version to 3.9.2
[grml-udev-config.git] / scripts / grml-udev-rebuildfstab
index 38fbd26..fd27022 100755 (executable)
@@ -1,9 +1,9 @@
 #!/bin/bash
-# Filename:      rebuildfstab
-# Purpose:       calls scanpartitions as root and adds entries to /etc/fstab
-# Authors:       grml-team (grml.org),  (c) Klaus Knopper Nov 2002, (c) Michael Prokop <mika@grml.org>
+# Filename:      scripts/grml-udev-rebuildfstab
+# Purpose:       udev script to update /etc/fstab
+# Authors:       grml-team (grml.org)
 # Bug-Reports:   see http://grml.org/bugs/
-# License:       This file is licensed under the GPL v2.
+# License:       This file is licensed under the GPL v2+.
 ################################################################################
 
 PATH="/bin:/sbin:/usr/bin:/usr/sbin"
@@ -141,16 +141,14 @@ break;
 if [ -n "$LABEL" ]  && [ -n "$ID_FS_LABEL_ENC" ] ; then
   # see check_for_label() in scanpartitions for details
   case $ID_FS_LABEL_ENC in
-    *\ *|*\x20*)
-      addinfo=" # space char inside label ($ID_FS_LABEL_ENC) not supported"
-      break ;;
-    /)
-      addinfo=" # label '/' not supported"
+    *\x*)
+      addinfo=" # special char in label ($ID_FS_LABEL_ENC) not supported"
       break ;;
+    *)
+      echo "LABEL=$ID_FS_LABEL_ENC"
+      return
+      break;
   esac
-
-  echo "LABEL=$ID_FS_LABEL_ENC"
-  return
 fi
 ;;
 esac
@@ -159,7 +157,7 @@ esac
 NAME="$DEVNAME"
 for name in $DEVLINKS ; do
     case $name in
-        *usb*|*cdrom*|*dvd*)
+        *usb-sd*|*cdrom*|*dvd*)
             NAME="$name"
            break;
         ;;