Add -p to blkid in hooks, to bypass the cache like in udev rules.

Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
This commit is contained in:
Gerardo Exequiel Pozzi 2010-03-06 19:12:04 -03:00
parent d38f1d1460
commit 4609c1c2d0
2 changed files with 2 additions and 2 deletions

View File

@ -89,7 +89,7 @@ archiso_mount_handler() {
launch_interactive_shell launch_interactive_shell
done done
FSTYPE=$(blkid -o value -s TYPE ${archisodevice} 2> /dev/null) FSTYPE=$(blkid -o value -s TYPE -p ${archisodevice} 2> /dev/null)
if [ -n "${FSTYPE}" ]; then if [ -n "${FSTYPE}" ]; then
if mount -r -t "${FSTYPE}" ${archisodevice} /bootmnt > /dev/null 2>&1; then if mount -r -t "${FSTYPE}" ${archisodevice} /bootmnt > /dev/null 2>&1; then
if [ -e "${isomounts}" ]; then if [ -e "${isomounts}" ]; then

View File

@ -2,7 +2,7 @@
run_hook () run_hook ()
{ {
if [ -n "${archisolabel}" ]; then if [ -n "${archisolabel}" ]; then
echo "ACTION==\"add|change\", SUBSYSTEM==\"block\", IMPORT{program}=\"/sbin/blkid -o udev \$tempnode\"" > /lib/udev/rules.d/00-archiso-device.rules echo "ACTION==\"add|change\", SUBSYSTEM==\"block\", IMPORT{program}=\"/sbin/blkid -o udev -p \$tempnode\"" > /lib/udev/rules.d/00-archiso-device.rules
echo "ENV{ID_FS_LABEL_ENC}==\"${archisolabel}\", SYMLINK+=\"archiso\"" >> /lib/udev/rules.d/00-archiso-device.rules echo "ENV{ID_FS_LABEL_ENC}==\"${archisolabel}\", SYMLINK+=\"archiso\"" >> /lib/udev/rules.d/00-archiso-device.rules
fi fi
} }