diff options
author | wchang kim <wchang.kim@samsung.com> | 2016-08-22 07:28:47 +0900 |
---|---|---|
committer | wchang kim <wchang.kim@samsung.com> | 2016-08-22 09:58:16 +0900 |
commit | 607ca16f972d4d6f69d274aca2e4db0a75f5543e (patch) | |
tree | 1c4995ca039be3dce341d5b82a5597c3221e8e03 | |
parent | 2e9473b3d964dfd7769c2a6c240d2648c99dacdc (diff) | |
download | system-plugin-607ca16f972d4d6f69d274aca2e4db0a75f5543e.tar.gz system-plugin-607ca16f972d4d6f69d274aca2e4db0a75f5543e.tar.bz2 system-plugin-607ca16f972d4d6f69d274aca2e4db0a75f5543e.zip |
Desciprtion : Temporary change.submit/tizen/20160822.045932submit/tizen/20160822.012953accepted/tizen/wearable/20160823.041233accepted/tizen/tv/20160823.041205accepted/tizen/mobile/20160823.041125accepted/tizen/ivi/20160823.041257accepted/tizen/common/20160822.132727
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>
-rw-r--r-- | Makefile.am | 1 | ||||
-rw-r--r-- | packaging/system-plugin.spec | 3 | ||||
-rw-r--r-- | scripts/mount-user.sh | 8 | ||||
-rw-r--r-- | src/liblazymount/lazy_mount_interface.c | 2 | ||||
-rw-r--r-- | src/liblazymount/test_lazymount.c | 14 | ||||
-rw-r--r-- | units/lazy_mount.service | 3 |
6 files changed, 27 insertions, 4 deletions
diff --git a/Makefile.am b/Makefile.am index 31c195a..a651e89 100644 --- a/Makefile.am +++ b/Makefile.am @@ -161,6 +161,7 @@ test_lazymount_CFLAGS = \ test_lazymount_LDADD = \ -lvconf \ + -lsystemd \ liblazymount.la systemunit_DATA += \ diff --git a/packaging/system-plugin.spec b/packaging/system-plugin.spec index baa81d1..dfb4c40 100644 --- a/packaging/system-plugin.spec +++ b/packaging/system-plugin.spec @@ -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 diff --git a/scripts/mount-user.sh b/scripts/mount-user.sh index 34ca172..d761431 100644 --- a/scripts/mount-user.sh +++ b/scripts/mount-user.sh @@ -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 diff --git a/src/liblazymount/lazy_mount_interface.c b/src/liblazymount/lazy_mount_interface.c index ec35fa6..d7034a7 100644 --- a/src/liblazymount/lazy_mount_interface.c +++ b/src/liblazymount/lazy_mount_interface.c @@ -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" diff --git a/src/liblazymount/test_lazymount.c b/src/liblazymount/test_lazymount.c index 41c74b2..26b0971 100644 --- a/src/liblazymount/test_lazymount.c +++ b/src/liblazymount/test_lazymount.c @@ -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"); diff --git a/units/lazy_mount.service b/units/lazy_mount.service index 6102f05..e1f4f46 100644 --- a/units/lazy_mount.service +++ b/units/lazy_mount.service @@ -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 |