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 31c195afe6bb1211807b8ac9a2d4a5f05ed81c2d..a651e89171e55d2c9c2b21d3dc6f871bd124278c 100644 (file)
@@ -161,6 +161,7 @@ test_lazymount_CFLAGS = \
 
 test_lazymount_LDADD = \
        -lvconf \
+       -lsystemd \
        liblazymount.la
 
 systemunit_DATA += \
index baa81d1526a34c572ae2c1893c8f3fea251fabfb..dfb4c406a531151792a919c2c24bb513f604f042 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 34ca17280655211ae13561035b3cab4783a359ec..d76143123a4e1958a5ef0662560c24757e34d463 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 ec35fa6debbc7be725a0c937f60982003dec4084..d7034a744159cb00192d758b651062d56ff7ac8e 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 41c74b232f238c8919fe8c4cc7e68838ef6bf09f..26b0971c86af0628a28c50feefb8b32f3d44cd53 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 6102f0512ee3b30fd5a5f0079a7662f583752037..e1f4f46ac6e9f329c7fbee0aec59e7ab0479f1a7 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