Desciprtion : Temporary change. 54/84654/5 accepted/tizen/common/20160822.132727 accepted/tizen/ivi/20160823.041257 accepted/tizen/mobile/20160823.041125 accepted/tizen/tv/20160823.041205 accepted/tizen/wearable/20160823.041233 submit/tizen/20160822.012953 submit/tizen/20160822.045932
authorwchang kim <wchang.kim@samsung.com>
Sun, 21 Aug 2016 22:28:47 +0000 (07:28 +0900)
committerwchang kim <wchang.kim@samsung.com>
Mon, 22 Aug 2016 00:58:16 +0000 (09:58 +0900)
Changing the default value of lazy mount for idle booting.
test_lazymount waits for mounting user parition and then call sd_notify
because efl library calls sd_notify.

These are temp codes for idle booting.

Change-Id: I62670413fa220203f1a2975885ecbac9885e6ce4
Signed-off-by: Woochang Kim <wchang.kim@samsung.com>
Makefile.am
packaging/system-plugin.spec
scripts/mount-user.sh
src/liblazymount/lazy_mount_interface.c
src/liblazymount/test_lazymount.c
units/lazy_mount.service

index 31c195a..a651e89 100644 (file)
@@ -161,6 +161,7 @@ test_lazymount_CFLAGS = \
 
 test_lazymount_LDADD = \
        -lvconf \
+       -lsystemd \
        liblazymount.la
 
 systemunit_DATA += \
index baa81d1..dfb4c40 100644 (file)
@@ -14,6 +14,7 @@ Source2:   liblazymount.manifest
 Requires(post): /usr/bin/systemctl
 Requires(post): /usr/bin/vconftool
 BuildRequires: pkgconfig(vconf)
+BuildRequires: pkgconfig(libsystemd)
 
 %description
 This package provides target specific system configuration files.
@@ -169,7 +170,7 @@ systemctl daemon-reload
 
 %post -n liblazymount
 /sbin/ldconfig
-/usr/bin/vconftool set -f -t int db/system/lazy_mount_show_ui 1
+/usr/bin/vconftool set -f -t int db/system/lazy_mount_show_ui 0
 systemctl daemon-reload
 
 %postun -n liblazymount  -p /sbin/ldconfig
index 34ca172..d761431 100644 (file)
@@ -4,4 +4,12 @@ PATH=/bin:/usr/bin:/sbin:/usr/sbin
 USER_DISK=`ls /dev/disk/by-partlabel/ | grep -i user`
 USER_MNT=/opt/usr
 
+mount | grep "/opt/usr"
+
+if [ $? = "0" ]
+then
+touch /run/.unlock_mnt
+else
 /usr/bin/mount PARTLABEL=$USER_DISK $USER_MNT
+touch /run/.unlock_mnt
+fi
index ec35fa6..d7034a7 100644 (file)
@@ -31,7 +31,7 @@
 #ifndef VCONFKEY_SYSTEM_LAZY_MOUNT_SHOW_UI
 #define VCONFKEY_SYSTEM_LAZY_MOUNT_SHOW_UI "db/system/lazy_mount_show_ui"
 #endif
-#define DEFAULT_VALUE_LAZY_MOUNT_SHOW_UI 1
+#define DEFAULT_VALUE_LAZY_MOUNT_SHOW_UI 0
 
 #define LAZY_MOUNT_FILE "/tmp/.lazy_mount"
 #define LAZY_MOUNT_CHECK_DIR "/run"
index 41c74b2..26b0971 100644 (file)
@@ -1,6 +1,8 @@
 #include <lazy_mount.h>
 #include <stdio.h>
 #include <stdlib.h>
+#include <systemd/sd-daemon.h>
+#include <string.h>
 
 int get_input()
 {
@@ -32,6 +34,18 @@ int main(int argc, char **argv)
 {
     int data;
        int sl_ret;
+       int i = 0;
+       if (argc == 2 && strncmp(argv[1], "wait", 5) == 0) {
+           for ( i = 0 ; i < 3 ; i++ ) {
+                       sl_ret = wait_mount_user();
+                       if (sl_ret != 0) continue;
+                       else break;
+               }
+
+               if ( i == 3 ) return -1;
+               sd_notify(0, "READY=1");
+               return 0;
+       }
        while(1)
        {
                printf("Test\n");
index 6102f05..e1f4f46 100644 (file)
@@ -1,11 +1,10 @@
 [Unit]
 Description=Mount /opt/usr
-ConditionPathIsMountPoint = !/opt/usr
+#ConditionPathIsMountPoint = !/opt/usr
 
 [Service]
 Type=oneshot
 SmackProcessLabel=System
 ExecStartPre=/usr/bin/rm -f /run/.unlock_mnt /tmp/.lazy_mount
 ExecStart=/usr/bin/mount-user.sh
-ExecStartPost=/usr/bin/touch /run/.unlock_mnt
 SuccessExitStatus=0