X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=scripts%2Fgrml-udev-rebuildfstab;h=38fbd2609fcae83e8aa29615eebb07206bccb5d3;hb=fd5cfa9aea4e7207e380df248f6f33042e303979;hp=9181b74b699bc4ad4fed7cc2844c306e4ac68840;hpb=0c368aea30a3e6175016922c19630dc7d7fac0fb;p=grml-udev-config.git diff --git a/scripts/grml-udev-rebuildfstab b/scripts/grml-udev-rebuildfstab index 9181b74..38fbd26 100755 --- a/scripts/grml-udev-rebuildfstab +++ b/scripts/grml-udev-rebuildfstab @@ -138,7 +138,20 @@ iso9660) break; ;; *) -[ -n "$LABEL" ] && [ -n "$ID_FS_LABEL" ] && echo "LABEL=$ID_FS_LABEL_ENC" && return +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" + break ;; + esac + + echo "LABEL=$ID_FS_LABEL_ENC" + return +fi ;; esac [ -n "$DM_NAME" ] && echo /dev/mapper/$DM_NAME && return @@ -208,7 +221,7 @@ mountpoint=$(get_mount_point $device) for devicelink in $DEVLINKS ; do # ignore external - case "$devicelink" in "*external*") continue ;; esac + case "$devicelink" in *external*) continue ;; esac stringinfile $devicelink $TMPFILE && bailout 0 done @@ -241,8 +254,8 @@ case $ACTION in add|change) ( flock -x 200 - echo $ADDEDBYGRML $DEVNAME >> /etc/fstab - echo $device $mountpoint $ID_FS_TYPE $options 0 0 $addinfo >> /etc/fstab + echo "$ADDEDBYGRML $DEVNAME" >> /etc/fstab + echo "$device $mountpoint $ID_FS_TYPE $options 0 0 $addinfo # $DEVNAME" >> /etc/fstab ) 200>/var/run/rebuildfstab.lock