udev: convert device description to ascii only

This commit is contained in:
Marek Marczykowski-Górecki 2014-07-05 16:13:08 +02:00
parent 36a2c99b49
commit 644372149f

View File

@ -1,7 +1,8 @@
#!/bin/bash #!/bin/bash
export LC_CTYPE=en_US.UTF-8
NAME=${DEVNAME#/dev/} NAME=${DEVNAME#/dev/}
DESC="${ID_MODEL} (${ID_FS_LABEL})" DESC="`echo "${ID_MODEL} (${ID_FS_LABEL})" | iconv -f utf8 -t ascii//TRANSLIT`"
SIZE=$[ $(cat /sys/$DEVPATH/size) * 512 ] SIZE=$[ $(cat /sys/$DEVPATH/size) * 512 ]
MODE=w MODE=w
XS_KEY="qubes-block-devices/$NAME" XS_KEY="qubes-block-devices/$NAME"