udev: add udev rule for TM2 to mount /opt/usr 18/200118/1 accepted/tizen/unified/20190220.071616 submit/tizen/20190219.084729
authorINSUN PYO <insun.pyo@samsung.com>
Tue, 19 Feb 2019 08:42:27 +0000 (17:42 +0900)
committerINSUN PYO <insun.pyo@samsung.com>
Tue, 19 Feb 2019 08:45:58 +0000 (17:45 +0900)
  TM2 does not have /dev/disk/by-partlabel/user.
  TM2 have /dev/disk/by-partlabel/USER instead.

  So, this udev rule makes "user" when "USER" is created.

Change-Id: I740ca6448ce7ebc089f24248c8d88a1d97fda1bf

packaging/session-utils.spec
units/61-partlabel-user-for-tm2.rules [new file with mode: 0644]

index 676b568d7250c370c88659412d748dbff865fe2c..86a122c48f4bb13d5965fea7a0a561fee9150324 100644 (file)
@@ -21,6 +21,13 @@ BuildArch: noarch
 %description -n glib-warning-crash-enable
 This package provices the configuration file that enable glib debugging.
 
+%package -n partlabel-user-udev-rule-for-tm2
+Summary: make /dev/disk/by-partlabel/user for TM2
+BuildArch: noarch
+
+%description -n partlabel-user-udev-rule-for-tm2
+This package provices the udev rule for /dev/disk/by-partlabel/user partition(only TM2).
+
 %prep
 %setup -q
 
@@ -44,6 +51,9 @@ mkdir -p %{buildroot}/etc/systemd/system.conf.d
 install -m 644 units/01-glib_warning_crash_enable.conf %{buildroot}/etc/systemd/user.conf.d/
 install -m 644 units/01-glib_warning_crash_enable.conf %{buildroot}/etc/systemd/system.conf.d/
 
+mkdir -p %{buildroot}%{_udevrulesdir}
+install -m 644 units/61-partlabel-user-for-tm2.rules %{buildroot}%{_udevrulesdir}/
+
 %files
 %license LICENSE.Apache-2.0
 %manifest session-utils.manifest
@@ -65,3 +75,8 @@ echo ""
 %manifest session-utils.manifest
 /etc/systemd/user.conf.d/01-glib_warning_crash_enable.conf
 /etc/systemd/system.conf.d/01-glib_warning_crash_enable.conf
+
+%files -n partlabel-user-udev-rule-for-tm2
+%license LICENSE.Apache-2.0
+%manifest session-utils.manifest
+%{_udevrulesdir}/61-partlabel-user-for-tm2.rules
diff --git a/units/61-partlabel-user-for-tm2.rules b/units/61-partlabel-user-for-tm2.rules
new file mode 100644 (file)
index 0000000..68ae03f
--- /dev/null
@@ -0,0 +1,2 @@
+# for TM2 only
+ACTION=="add|change", SUBSYSTEM=="block", KERNEL=="mmcblk*[0-9]", ENV{DEVTYPE}=="partition", ENV{ID_PART_ENTRY_SCHEME}=="gpt", ENV{ID_PART_ENTRY_NAME}=="USER", SYMLINK+="disk/by-partlabel/user"