Guest User

login.d/20desktop

a guest
Nov 2nd, 2015
67
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #! /bin/sh
  2. # Copyright 2010-2012 Calculate Ltd. http://www.calculate-linux.org
  3. #
  4. #  Licensed under the Apache License, Version 2.0 (the "License");
  5. #  you may not use this file except in compliance with the License.
  6. #  You may obtain a copy of the License at
  7. #
  8. #      http://www.apache.org/licenses/LICENSE-2.0
  9. #
  10. #  Unless required by applicable law or agreed to in writing, software
  11. #  distributed under the License is distributed on an "AS IS" BASIS,
  12. #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. #  See the License for the specific language governing permissions and
  14. #  limitations under the License.
  15.  
  16. env-update
  17. source /etc/profile
  18. source /usr/share/calculate/xdm/functions
  19.  
  20. if [ -e '/usr/sbin/cl-desktop' ];
  21. then
  22.   # skip desktop configure if user not domain and it already has home dir
  23.   # with not /etc/skel contents
  24.   userHome=`getent passwd $USER | awk -F: '{ print( $6 ); }'`
  25.   ERRORLOG=`/usr/sbin/cl-desktop --gui-progress $USER 2>&1`
  26.   # raise xmessage error if cl-desktop failed
  27.   if [ "$?" -gt "0" ];
  28.   then
  29.     # write error message to logfile
  30.     echo "$ERRORLOG" >> $FILE_LOG
  31.     # display error by xmessage
  32.     exit 1
  33.   fi
  34. fi
  35. exit 0
RAW Paste Data