gio-2.0
gio-unix-2.0
libudev
+ libsystemd
)
INCLUDE(FindPkgConfig)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/scripts/${PROJECT_NAME}.conf DESTINATION /etc/dbus-1/system.d)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/scripts/pass-pmqos.conf DESTINATION /etc/pass)
INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/scripts/pass-thermal.conf DESTINATION /etc/pass)
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/systemd/org.tizen.system.pass.service DESTINATION /usr/share/dbus-1/system-services)
CONFIGURE_FILE(${PROJECT_NAME}.pc.in ${PROJECT_NAME}.pc @ONLY)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.pc DESTINATION ${LIB_INSTALL_DIR}/pkgconfig)
BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(gmock)
BuildRequires: pkgconfig(libudev)
+BuildRequires: pkgconfig(libsystemd)
%description
PASS (Power-Aware System Service)
%{_bindir}/%{daemon_name}
%{_unitdir}/delayed.target.wants/%{daemon_name}.service
%{_unitdir}/%{daemon_name}.service
+%{_datadir}/dbus-1/system-services/org.tizen.system.pass.service
%files -n %{hal_name}
%defattr(-,root,root,-)
#include <string.h>
#include <gio/gio.h>
#include <sys/reboot.h>
+#include <systemd/sd-daemon.h>
#include <pass/common.h>
#include <pass/device-notifier.h>
g_main_loop_quit(g_mainloop);
}
+static void pass_name_acquired_cb(GDBusConnection *connection,
+ const gchar *name, gpointer user_data)
+{
+ sd_notify(0, "READY=1");
+}
+
static int late_init(void)
{
int ret;
signal(SIGTERM, sig_quit);
signal(SIGUSR1, sig_usr1);
- ret = pass_gdbus_get_name(PASS_DBUS_CORE, DBUS_PASS_BUS_NAME, NULL);
+ ret = pass_gdbus_get_name(PASS_DBUS_CORE,
+ DBUS_PASS_BUS_NAME, pass_name_acquired_cb);
if (ret < 0)
return ret;
--- /dev/null
+[D-BUS Service]
+Name=org.tizen.system.pass
+Exec=/bin/false
+SystemdService=pass.service
Description=PASS daemon
[Service]
+Type=notify
SmackProcessLabel=System
ExecStart=/usr/bin/pass
Restart=always