X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=scripts%2Fgrml-udev-rebuildfstab;h=6ff1b187c7dfd3b0ad808fa0458f0c9f7bbc2712;hb=a8d478465a6f7caa964aa11b64124cbc9845c8ab;hp=38fbd2609fcae83e8aa29615eebb07206bccb5d3;hpb=fd5cfa9aea4e7207e380df248f6f33042e303979;p=grml-udev-config.git diff --git a/scripts/grml-udev-rebuildfstab b/scripts/grml-udev-rebuildfstab index 38fbd26..6ff1b18 100755 --- a/scripts/grml-udev-rebuildfstab +++ b/scripts/grml-udev-rebuildfstab @@ -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 +# 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" @@ -97,9 +97,9 @@ devpts /dev/pts devpts noauto,mode=0622 0 # none /proc/bus/usb usbfs defaults,nodev,noexec,nosuid,noauto,devgid=1001,devmode=664 0 0 # 192.168.1.101:/backups /mnt/nfs nfs defaults,user,wsize=8192,rsize=8192 0 0 # -# Warning! Please do *not* change any lines below because they are auto-generated by rebuildfstab! +# Warning! Please do *not* change any lines below because they are auto-generated. # If you want to disable rebuildfstab set CONFIG_FSTAB='no' in /etc/grml/autoconfig! -# See 'man grml-rebuildfstab' for more details about the following entries. +# See 'man grml-udev-rebuildfstab' for more details about the following entries. EOF fi ) 200>/var/run/rebuildfstab.lock @@ -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; ;;