[Bug 690969] Re: ltspfs_entry uses nonexistent blkid variable ID_FS_LABEL_SAFE to generate mountpoint
Stéphane Graber
stgraber at stgraber.org
Thu Jul 7 09:01:40 UTC 2011
** Also affects: ltsp
Importance: Undecided
Status: New
** Changed in: ltsp
Status: New => Fix Committed
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to ltspfs in Ubuntu.
https://bugs.launchpad.net/bugs/690969
Title:
ltspfs_entry uses nonexistent blkid variable ID_FS_LABEL_SAFE to
generate mountpoint
Status in Linux Terminal Server Project:
Fix Committed
Status in “ltspfs” package in Ubuntu:
Triaged
Bug description:
Binary package hint: ltspfs
If I plug in a USB disk to an LTSP terminal, it always gets a name
like "usbdisk-sdb1".
It seems that this part of ltspfs_entry tries to generate a human-
readable label in add_device():
[ -z "${LABEL}" ] && LABEL=${ID_FS_LABEL_SAFE}
However this environment variable is not set by udev/blkid. Example
output:
manager at zambiaserver1:~$ sudo blkid -o udev /dev/md0
ID_FS_LABEL=Old_System
ID_FS_LABEL_ENC=Old\x20System
ID_FS_UUID=dda64916-4dab-44bc-8b23-376ef99cb133
ID_FS_UUID_ENC=dda64916-4dab-44bc-8b23-376ef99cb133
ID_FS_SEC_TYPE=ext2
ID_FS_TYPE=ext3
It seems that ID_FS_LABEL is now "safe", see util-linux/misc-
utils/blkid.c in print_udev_format:
} else if (!strcmp(name, "UUID") ||
!strcmp(name, "LABEL") ||
!strcmp(name, "UUID_SUB")) {
blkid_safe_string(value, safe, sizeof(safe));
printf("ID_FS_%s=%s\n", name, safe);
blkid_encode_string(value, enc, sizeof(enc));
printf("ID_FS_%s_ENC=%s\n", name, enc);
So I think the following patch is appropriate:
manager at zambiaserver1:/opt/ltsp/i386$ diff -u lib/udev/ltspfs_entry{.old,}
--- lib/udev/ltspfs_entry.old 2010-12-16 09:15:50.795266000 +0200
+++ lib/udev/ltspfs_entry 2010-12-16 09:16:49.199266000 +0200
@@ -247,7 +247,7 @@
;;
esac
- [ -z "${LABEL}" ] && LABEL=${ID_FS_LABEL_SAFE}
+ [ -z "${LABEL}" ] && LABEL="${ID_FS_LABEL}"
[ -z "${LABEL}" ] && LABEL="${ID_BUS}${ID_TYPE}-${DEVICENAME}"
# Check for existing label with same name
To manage notifications about this bug go to:
https://bugs.launchpad.net/ltsp/+bug/690969/+subscriptions
More information about the foundations-bugs
mailing list