Add path file to launch starter 31/42331/4 accepted/tizen/mobile/20150626.065042 submit/tizen_mobile/20150626.053138
authorgs86.lee <gs86.lee@samsung.com>
Fri, 26 Jun 2015 01:57:22 +0000 (10:57 +0900)
committerjunkyu.han <junkyu.han@samsung.com>
Fri, 26 Jun 2015 05:28:48 +0000 (14:28 +0900)
Change-Id: I67c6dde712a84170f7024665311406222d78bab6

packaging/starter-pre.path [new file with mode: 0644]
packaging/starter-pre.service
packaging/starter.path [new file with mode: 0644]
packaging/starter.service
packaging/starter.spec
packaging/wait-lock.service [deleted file]
rd3starter
src/mobile/lock_mgr.c

diff --git a/packaging/starter-pre.path b/packaging/starter-pre.path
new file mode 100644 (file)
index 0000000..5abc563
--- /dev/null
@@ -0,0 +1,5 @@
+[Unit]
+Description=Start the "starter" program
+
+[Path]
+PathExists=/run/.wm_ready
index bbbf95b..2329ba9 100644 (file)
@@ -2,6 +2,7 @@
 Description=Pre actions for "starter"
 
 [Service]
+EnvironmentFile=/run/tizen-system-env
 Type=oneshot
 ExecStart=/etc/init.d/rd3starter
 SmackProcessLabel=starter
diff --git a/packaging/starter.path b/packaging/starter.path
new file mode 100644 (file)
index 0000000..5abc563
--- /dev/null
@@ -0,0 +1,5 @@
+[Unit]
+Description=Start the "starter" program
+
+[Path]
+PathExists=/run/.wm_ready
index 08e4873..2a8bc63 100644 (file)
@@ -4,6 +4,7 @@ Requires=starter-pre.service
 After=starter-pre.service wm_ready.service ac.service deviced.service launchpad-preload.service
 
 [Service]
+EnvironmentFile=/run/tizen-system-env
 ExecStart=/usr/bin/starter
 Restart=always
 RestartSec=0
index 0a4736d..4daed74 100644 (file)
@@ -1,4 +1,5 @@
 %bcond_with wayland
+%define __libdir /usr/lib
 
 Name:       starter
 Summary:    starter
@@ -8,8 +9,9 @@ Group:      TO_BE/FILLED_IN
 License:    Apache-2.0
 Source0:    starter-%{version}.tar.gz
 Source1:    starter.service
-Source2:    wait-lock.service
+Source2:    starter.path
 Source3:    starter-pre.service
+Source4:    starter-pre.path
 
 %if "%{?tizen_profile_name}"=="tv"
 ExcludeArch: %{arm} %ix86 x86_64
@@ -105,21 +107,28 @@ make -j1
 rm -rf %{buildroot}
 %make_install
 
-mkdir -p %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants
-install -m 0644 %SOURCE1 %{buildroot}%{_libdir}/systemd/system/starter.service
-install -m 0644 %SOURCE3 %{buildroot}%{_libdir}/systemd/system/starter-pre.service
-ln -s ../starter.service %{buildroot}%{_libdir}/systemd/system/multi-user.target.wants/starter.service
-mkdir -p %{buildroot}%{_libdir}/systemd/system/tizen-system.target.wants
-install -m 0644 %SOURCE2 %{buildroot}%{_libdir}/systemd/system/wait-lock.service
-ln -s ../wait-lock.service %{buildroot}%{_libdir}/systemd/system/tizen-system.target.wants/
+mkdir -p %{buildroot}%{__libdir}/systemd/system/multi-user.target.wants
+mkdir -p %{buildroot}%{__libdir}/systemd/system/tizen-system.target.wants
+mkdir -p %{buildroot}%{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
+
+install -m 0644 %SOURCE1 %{buildroot}%{__libdir}/systemd/system/starter.service
+ln -s ../starter.service %{buildroot}%{__libdir}/systemd/system/multi-user.target.wants/starter.service
+ln -s %{__libdir}/systemd/system/starter.service %{buildroot}%{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
+
+install -m 0644 %SOURCE2 %{buildroot}%{__libdir}/systemd/system/starter.path
+ln -s ../starter.path %{buildroot}%{__libdir}/systemd/system/multi-user.target.wants/starter.path
+
+install -m 0644 %SOURCE3 %{buildroot}%{__libdir}/systemd/system/starter-pre.service
+ln -s ../starter-pre.service %{buildroot}%{__libdir}/systemd/system/multi-user.target.wants/starter-pre.service
+ln -s %{__libdir}/systemd/system/starter-pre.service %{buildroot}%{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
+
+install -m 0644 %SOURCE4 %{buildroot}%{__libdir}/systemd/system/starter-pre.path
+ln -s ../starter-pre.path %{buildroot}%{__libdir}/systemd/system/multi-user.target.wants/starter-pre.path
+
 mkdir -p %{buildroot}/usr/share/license
 cp -f LICENSE %{buildroot}/usr/share/license/%{name}
 mkdir -p %{buildroot}/opt/data/home-daemon
 
-mkdir -p %{buildroot}%{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
-ln -s %{_libdir}/systemd/system/starter.service %{buildroot}%{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
-ln -s %{_libdir}/systemd/system/starter-pre.service %{buildroot}%{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
-
 %post
 change_file_executable()
 {
@@ -139,7 +148,6 @@ vconftool set -t string db/private/starter/fallback_pkg "org.tizen.homescreen" $
 
 
 mkdir -p %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
-ln -s %{_libdir}/systemd/system/wait-lock.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
 
 #ln -sf /etc/init.d/rd4starter /etc/rc.d/rc4.d/S81starter
 #ln -sf /etc/init.d/rd4starter /etc/rc.d/rc3.d/S81starter
@@ -152,13 +160,16 @@ sync
 %{_sysconfdir}/init.d/rd4starter
 %{_sysconfdir}/init.d/rd3starter
 %{_bindir}/starter
-%{_libdir}/systemd/system/starter.service
-%{_libdir}/systemd/system/multi-user.target.wants/starter.service
+%{__libdir}/systemd/system/starter.service
+%{__libdir}/systemd/system/starter.path
+%{__libdir}/systemd/system/starter-pre.service
+%{__libdir}/systemd/system/starter-pre.path
+%{__libdir}/systemd/system/multi-user.target.wants/starter.service
+%{__libdir}/systemd/system/multi-user.target.wants/starter.path
+%{__libdir}/systemd/system/multi-user.target.wants/starter-pre.service
+%{__libdir}/systemd/system/multi-user.target.wants/starter-pre.path
 %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/starter.service
-%{_libdir}/systemd/system/starter-pre.service
 %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/starter-pre.service
-%{_libdir}/systemd/system/wait-lock.service
-%{_libdir}/systemd/system/tizen-system.target.wants/wait-lock.service
 /usr/share/license/%{name}
 /opt/data/home-daemon
 /usr/share/locale/*/LC_MESSAGES/*
diff --git a/packaging/wait-lock.service b/packaging/wait-lock.service
deleted file mode 100644 (file)
index 607434a..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-[Unit]
-Description=wait lockscreen
-After=tizen-boot.target boot-animation.service
-Requires=tizen-boot.target
-Before=tizen-system.target
-ConditionPathExists=|/tmp/.passwordlock
-
-[Service]
-Type=oneshot
-ExecStart=/bin/sh -c 'while [ -e /tmp/.passwordlock ]; do sleep 0.5 ; done'
-TimeoutSec=7s
-SmackProcessLabel=starter
-
-[Install]
-WantedBy=tizen-system.target
index b9762ab..ce80d71 100644 (file)
@@ -6,7 +6,7 @@
 #      sleep 0.1
 #done
 
-while [ ! -f /tmp/amd_ready ];
+while [ ! -f /run/amd_ready ];
 do
         /bin/sleep 0.1
 done
index 3d81ed1..7dc0a3f 100644 (file)
@@ -559,48 +559,6 @@ ERROR:
 
 
 
-static void _check_ongoing(bool ongoing)
-{
-       if (ongoing) {
-               /* check previous process */
-               if (s_lock_mgr.checkfd) {
-                       _E("checkfd fail");
-                       return;
-               }
-
-               if (access(PASSWORD_LOCK_PROGRESS, F_OK) == 0) {
-                       _E("file(%s) is exist", PASSWORD_LOCK_PROGRESS);
-                       return;
-               }
-
-               /* make tmp file */
-               s_lock_mgr.checkfd = creat(PASSWORD_LOCK_PROGRESS, 0640);
-
-               if (s_lock_mgr.checkfd < 0) {
-                       _E("Failed to make %s file", PASSWORD_LOCK_PROGRESS);
-                       s_lock_mgr.checkfd = 0;
-               }
-
-               _W("make %s file", PASSWORD_LOCK_PROGRESS);
-               s_lock_mgr.checkfd = 1;
-       } else {
-               if (!s_lock_mgr.checkfd) {
-                       _E("checkfd is NULL");
-                       return;
-               }
-
-               if (unlink(PASSWORD_LOCK_PROGRESS) < 0) {
-                       _E("Failed to remove %s file", PASSWORD_LOCK_PROGRESS);
-               }
-
-               close(s_lock_mgr.checkfd);
-               s_lock_mgr.checkfd = 0;
-               _W("delete %s file", PASSWORD_LOCK_PROGRESS);
-       }
-}
-
-
-
 static void _lock_daemon_init(void)
 {
        _SECURE_D("default lock screen pkg name is %s", status_passive_get()->setappl_3rd_lock_pkg_name_str);
@@ -648,15 +606,6 @@ int lock_mgr_daemon_start(void)
        lock_type = status_active_get()->setappl_screen_lock_type_int;
        _D("lock type : %d", lock_type);
 
-       if (lock_type == SETTING_SCREEN_LOCK_TYPE_SIMPLE_PASSWORD ||
-                       lock_type == SETTING_SCREEN_LOCK_TYPE_PASSWORD) {
-               if (s_lock_mgr.checkfd) {
-                       _check_ongoing(EINA_FALSE);
-               } else {
-                       _check_ongoing(EINA_TRUE);
-               }
-       }
-
        ret = lock_mgr_lockscreen_launch();
        _D("ret : %d", ret);