Add common config for singleseat 06/38106/1 accepted/tizen/common/20150414.100045 accepted/tizen/mobile/20150415.015027 accepted/tizen/tv/20150415.012550 accepted/tizen/wearable/20150415.013809 submit/tizen/20150414.011614
authorJiyoung Yun <jy910.yun@samsung.com>
Mon, 13 Apr 2015 06:18:28 +0000 (15:18 +0900)
committerJiyoung Yun <jy910.yun@samsung.com>
Mon, 13 Apr 2015 06:21:49 +0000 (15:21 +0900)
The existing common config install tlm-default.conf file and
it will link in tlm.conf file when common-config is installed.
The common-singleseat will be included in mobile, tv and wearable profile.

Signed-off-by: Jiyoung Yun <jy910.yun@samsung.com>
Change-Id: I30e02602ac1048c675d0d9097c9c5db10235ec54

data/tizen-common/etc/tlm-default.conf [moved from data/tizen-common/etc/tlm.conf with 100% similarity]
data/tizen-common/etc/tlm-singleseat.conf [new file with mode: 0644]
packaging/tlm.spec

diff --git a/data/tizen-common/etc/tlm-singleseat.conf b/data/tizen-common/etc/tlm-singleseat.conf
new file mode 100644 (file)
index 0000000..9c8868e
--- /dev/null
@@ -0,0 +1,84 @@
+#
+# Example configuration for tlm.
+#
+
+#
+# This group contains top-level settings.
+#
+[General]
+#
+# Name of the account plugin to use to manage(add/remove) guest user accounts
+ACCOUNTS_PLUGIN=gumd
+#
+# Number of seats
+# Default: obtain from systemd
+NSEATS=1
+#
+# Auto-login default user
+# Default: off
+# AUTO_LOGIN=1
+#
+# Prepare default/guest users before auto-login
+# Default: off
+# PREPARE_DEFAULT=1
+#
+# PAM service file to use
+# PAM_SERVICE=tlm-login
+#
+# PAM service file for default user
+# DEFAULT_PAM_SERVICE=tlm-default-login
+#
+# Default (guest) username or template to use
+#  %S - seat number
+#  %I - seat id string
+# Default: "guest"
+# DEFAULT_USER=guest_%S
+#
+# Session command : The command run after successfull login
+# Default: $SHELL
+# In case shell is not defined in /etc/passwd fallback is "systemd --user"
+#SESSION_CMD=systemd --user
+#
+# Session termination timeout in seconds
+# Default: 10
+#TERMINATE_TIMEOUT=10
+#
+# Setup terminal for session
+# Default: off
+#SETUP_TERMINAL=1
+#
+# Use X11 style sessions
+# Default: off
+#X11_SESSION=1
+#
+# Do not launch anything, let systemd handle it through PAM
+# Default: off
+#PAUSE_SESSION=1
+#
+# Specify session type, needs to be specified for
+# XDG_SESSION_CLASS and XDG_SESSION_TYPE to be set
+# Default: unspecified
+#SESSION_TYPE=wayland
+#
+#
+# Seat specific settings where the group name is seat id
+[seat0]
+DEFAULT_USER=owner
+#DEFAULT_USER=tizen
+SETUP_TERMINAL=1
+VTNR=7
+#SESSION_CMD=weston-launch
+#DEFAULT_PAM_SERVICE=tlm-system-login
+#SETUP_RUNTIME_DIR=1
+#RUNTIME_MODE=0700
+#
+#[seat1]
+#ACTIVE=0
+#DEFAULT_USER=guest_%S
+#DEFAULT_USER=app
+#
+#
+# plugin specific settings.
+#
+#[pluginname]
+#
index ea4318b..d556ed7 100644 (file)
@@ -75,6 +75,16 @@ Provides:   %{name}-config
 %description config-common
 Tiny Login Manager configuration files for common-profile.
 
+%package config-common-singleseat
+Summary:    Configuration files for common-profile with single seat
+Group:      System/Service
+Requires:   %{name} = %{version}-%{release}
+Provides:   %{name}-config
+
+%description config-common-singleseat
+Tiny Login Manager configuration files for common-profile with
+signle seat.
+
 %else
 
 %package config-ivi-singleseat
@@ -189,7 +199,7 @@ install -m 644 data/tizen-ivi/10-multiseat-vtc1010.rules %{buildroot}%{_sysconfd
 install -m 755 -d %{buildroot}%{_sysconfdir}/profile.d
 install -m 644 data/tizen-ivi/etc/profile.d/* %{buildroot}%{_sysconfdir}/profile.d/
 %else
-install -m 644 data/tizen-common/etc/tlm.conf %{buildroot}%{_sysconfdir}
+install -m 644 data/tizen-common/etc/tlm*.conf %{buildroot}%{_sysconfdir}
 install -m 755 data/tizen-common/etc/session.d/* %{buildroot}%{_sysconfdir}/session.d/
 %endif
 
@@ -204,6 +214,9 @@ install -m 755 data/tizen-common/etc/session.d/* %{buildroot}%{_sysconfdir}/sess
 %if "%{profile}" != "ivi"
 
 %post config-common
+if [ ! -e /etc/tlm.conf ] || [ -h /etc/tlm.conf ]; then
+       ln -s -f /etc/tlm-default.conf /etc/tlm.conf
+fi
 systemctl enable tlm
 systemctl daemon-reload
 
@@ -218,6 +231,25 @@ if [ -h /etc/tlm.conf ] && [ $1 == 0 ]; then
        rm -f /etc/tlm.conf
 fi
 
+
+%post config-common-singleseat
+if [ ! -e /etc/tlm.conf ] || [ -h /etc/tlm.conf ]; then
+       ln -s -f /etc/tlm-singleseat.conf /etc/tlm.conf
+fi
+systemctl enable tlm
+systemctl daemon-reload
+
+%preun config-common-singleseat
+if [ $1 == 0 ]; then
+       systemctl disable tlm
+       systemctl daemon-reload
+fi
+
+%postun config-common-singleseat
+if [ -h /etc/tlm.conf ] && [ $1 == 0 ]; then
+       rm -f /etc/tlm.conf
+fi
+
 %else
 
 %post config-ivi-singleseat
@@ -354,9 +386,14 @@ fi
 %files config-common
 %defattr(-,root,root,-)
 %manifest %{name}.manifest
-%config(noreplace) %{_sysconfdir}/tlm.conf
+%config(noreplace) %{_sysconfdir}/tlm-default.conf
 %config(noreplace) %{_sysconfdir}/session.d/*
 
+%files config-common-singleseat
+%defattr(-,root,root,-)
+%manifest %{name}.manifest
+%config(noreplace) %{_sysconfdir}/tlm-singleseat.conf
+
 %else
 
 %files config-ivi-singleseat