From dcfd826d43159bbde6070c6135ef4238fffc1dd4 Mon Sep 17 00:00:00 2001 From: Mike Khiretskiy Date: Tue, 31 Mar 2015 14:33:00 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D1=8B=20=D1=81=D0=BA=D1=80=D0=B8=D0=BF=D1=82=D1=8B?= =?UTF-8?q?=20=D0=B2=D1=85=D0=BE=D0=B4=D0=B0=20=D0=B2=20=D1=81=D0=B5=D0=B0?= =?UTF-8?q?=D0=BD=D1=81=20=D0=B4=D0=BB=D1=8F=20=D0=B8=D0=B7=D0=BC=D0=B5?= =?UTF-8?q?=D0=BD=D1=91=D0=BD=D0=BD=D0=BE=D0=B3=D0=BE=20xdm=20login?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- data/login.d/10client | 36 ++++++++++++++++------------------ data/login.d/15resume_remount | 19 ++++++++---------- data/logout.d/10client | 36 ++++++++++++++++------------------ data/logout.d/15resume_remount | 18 ++++++++--------- 4 files changed, 50 insertions(+), 59 deletions(-) diff --git a/data/login.d/10client b/data/login.d/10client index c90af42..bc4e834 100644 --- a/data/login.d/10client +++ b/data/login.d/10client @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright 2010 Calculate Ltd. http://www.calculate-linux.org +# Copyright 2010-2015 Calculate Ltd. http://www.calculate-linux.org # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,21 +13,19 @@ # See the License for the specific language governing permissions and # limitations under the License. -/usr/sbin/env-update -source /etc/profile -source /usr/share/calculate/xdm/functions - -if [ -e '/usr/sbin/cl-client-sync-login' ]; -then - if [[ "${DOMAIN_USER}" == "on" ]] - then - ERRORLOG=`/usr/sbin/cl-client-sync-login --gui-progress --gui-warning $USER 2>&1` - # log error - if [ "$?" -gt "0" ]; - then - echo "$ERRORLOG" >> $FILE_LOG - exit 1 - fi - fi -fi -exit 0 +run_script() { + if [ -e '/usr/sbin/cl-client-sync-login' ]; + then + if [[ "${DOMAIN_USER}" == "on" ]] + then + ERRORLOG=`/usr/sbin/cl-client-sync-login --gui-progress --gui-warning $USER 2>&1` + # log error + if [ "$?" -gt "0" ]; + then + echo "$ERRORLOG" >> $FILE_LOG + return 1 + fi + fi + fi + return 0 +} diff --git a/data/login.d/15resume_remount b/data/login.d/15resume_remount index a991817..07be4da 100644 --- a/data/login.d/15resume_remount +++ b/data/login.d/15resume_remount @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright 2013 Calculate Ltd. http://www.calculate-linux.org +# Copyright 2013-2015 Calculate Ltd. http://www.calculate-linux.org # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,13 +13,10 @@ # See the License for the specific language governing permissions and # limitations under the License. -/usr/sbin/env-update -source /etc/profile -source /usr/share/calculate/xdm/functions - -if [[ "${DOMAIN_USER}" == "on" ]] -then - /usr/sbin/cl-client-resume-remount ${USER} & -fi - -exit 0 +run_script() { + if [[ "${DOMAIN_USER}" == "on" ]] + then + /usr/sbin/cl-client-resume-remount ${USER} & + fi + return 0 +} diff --git a/data/logout.d/10client b/data/logout.d/10client index 9737480..690bf5d 100644 --- a/data/logout.d/10client +++ b/data/logout.d/10client @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright 2010 Calculate Ltd. http://www.calculate-linux.org +# Copyright 2010-2015 Calculate Ltd. http://www.calculate-linux.org # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,21 +13,19 @@ # See the License for the specific language governing permissions and # limitations under the License. -/usr/sbin/env-update -source /etc/profile -source /usr/share/calculate/xdm/functions - -if [ -e '/usr/sbin/cl-client-sync-logout' ]; -then - if [[ "${DOMAIN_USER}" == "on" ]] - then - ERRORLOG=`/usr/sbin/cl-client-sync-logout $USER 2>&1` - # log errors - if [ "$?" -gt "0" ]; - then - echo "$ERRORLOG" >> $FILE_LOG - exit 1 - fi - fi -fi -exit 0 +run_script() { + if [ -e '/usr/sbin/cl-client-sync-logout' ]; + then + if [[ "${DOMAIN_USER}" == "on" ]] + then + ERRORLOG=`/usr/sbin/cl-client-sync-logout $USER 2>&1` + # log errors + if [ "$?" -gt "0" ]; + then + echo "$ERRORLOG" >> $FILE_LOG + return 1 + fi + fi + fi + return 0 +} diff --git a/data/logout.d/15resume_remount b/data/logout.d/15resume_remount index b49adb6..e1fa353 100644 --- a/data/logout.d/15resume_remount +++ b/data/logout.d/15resume_remount @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright 2013 Calculate Ltd. http://www.calculate-linux.org +# Copyright 2013-2015 Calculate Ltd. http://www.calculate-linux.org # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,13 +13,11 @@ # See the License for the specific language governing permissions and # limitations under the License. -/usr/sbin/env-update -source /etc/profile -source /usr/share/calculate/xdm/functions +run_script() { + if [[ "${DOMAIN_USER}" == "on" ]] + then + pkill -f "cl-client-resume-remount ${USER}" + fi -if [[ "${DOMAIN_USER}" == "on" ]] -then - pkill -f "cl-client-resume-remount ${USER}" -fi - -exit 0 + return 0 +}