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>
test_lazymount_LDADD = \
-lvconf \
+ -lsystemd \
liblazymount.la
systemunit_DATA += \
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.
%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
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
#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"
#include <lazy_mount.h>
#include <stdio.h>
#include <stdlib.h>
+#include <systemd/sd-daemon.h>
+#include <string.h>
int get_input()
{
{
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");
[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