blob: 2848d15ae6756879a86fc7d4abf73d7ca6e4426e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
From befcce7e25a74424b9c4c42cecd67daea71819da Mon Sep 17 00:00:00 2001
From: Awais Belal <awais_belal@mentor.com>
Date: Tue, 29 Jan 2019 15:02:45 +0500
Subject: [PATCH 2/3] udev-extraconf/mount.sh: save mount name in our tmp file
cache
Doing this will allow to fetch the exact name created by the
auto-mounter during the remove action where depending on the
scenario utilities such as the blkid might not be usable due
to actual device not being present on the system.
Signed-off-by: Awais Belal <awais_belal@mentor.com>
---
mount.sh | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
Index: 1.1-r0/mount.sh
===================================================================
--- 1.1-r0.orig/mount.sh
+++ 1.1-r0/mount.sh
@@ -130,7 +130,10 @@ automount() {
rm_dir "$MOUNT_BASE/$name"
else
logger "mount.sh/automount" "Auto-mount of [$MOUNT_BASE/$name] successful"
- touch "/tmp/.automount-$name"
+ # The actual device might not be present in the remove event so blkid cannot
+ # be used to calculate what name was generated here. Simply save the mount
+ # name in our tmp file.
+ echo "$name" > "/tmp/.automount-$name"
fi
}
|