Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 #!/bin/sh | 1 #!/bin/sh |
| 2 | 2 |
| 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 3 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 4 # Use of this source code is governed by a BSD-style license that can be | 4 # Use of this source code is governed by a BSD-style license that can be |
| 5 # found in the LICENSE file. | 5 # found in the LICENSE file. |
| 6 | 6 |
| 7 # Version = @@VERSION@@ | 7 # Version = @@VERSION@@ |
| 8 | 8 |
| 9 HELPERTOOLS=/Library/PrivilegedHelperTools | 9 HELPERTOOLS=/Library/PrivilegedHelperTools |
| 10 SERVICE_NAME=org.chromium.chromoting | 10 SERVICE_NAME=org.chromium.chromoting |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 53 trap 'rm -f "$USERS_TMP_FILE"' EXIT | 53 trap 'rm -f "$USERS_TMP_FILE"' EXIT |
| 54 | 54 |
| 55 logger Running Chrome Remote Desktop postflight script @@VERSION@@ | 55 logger Running Chrome Remote Desktop postflight script @@VERSION@@ |
| 56 | 56 |
| 57 # Register a ticket with Keystone to keep this package up to date. | 57 # Register a ticket with Keystone to keep this package up to date. |
| 58 $KSADMIN --register --productid "$KSPID" --version "$KSPVERSION" \ | 58 $KSADMIN --register --productid "$KSPID" --version "$KSPVERSION" \ |
| 59 --xcpath "$PLIST" --url "$KSUPDATE" | 59 --xcpath "$PLIST" --url "$KSUPDATE" |
| 60 | 60 |
| 61 # If there is a backup _enabled file, re-enable the service. | 61 # If there is a backup _enabled file, re-enable the service. |
| 62 if [[ -f "$ENABLED_FILE_BACKUP" ]]; then | 62 if [[ -f "$ENABLED_FILE_BACKUP" ]]; then |
| 63 mv "$ENABLED_FILE_BACKUP" "$ENABLED_FILE" | 63 mv "$ENABLED_FILE_BACKUP" "$ENABLED_FILE" |
|
Jamie
2016/08/24 21:29:16
Add a log here.
garykac
2016/08/24 21:35:08
Done.
| |
| 64 fi | 64 fi |
| 65 | 65 |
| 66 # Create the PAM configuration unless it already exists and has been edited. | 66 # Create the PAM configuration unless it already exists and has been edited. |
| 67 update_pam=1 | 67 update_pam=1 |
| 68 CONTROL_LINE="# If you edit this file, please delete this line." | 68 CONTROL_LINE="# If you edit this file, please delete this line." |
| 69 if [[ -f "$PAM_CONFIG" ]] && ! grep -qF "$CONTROL_LINE" "$PAM_CONFIG"; then | 69 if [[ -f "$PAM_CONFIG" ]] && ! grep -qF "$CONTROL_LINE" "$PAM_CONFIG"; then |
| 70 update_pam=0 | 70 update_pam=0 |
| 71 fi | 71 fi |
| 72 | 72 |
| 73 if [[ "$update_pam" == "1" ]]; then | 73 if [[ "$update_pam" == "1" ]]; then |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 114 # work. To do this, find the PID of a process which is running in that | 114 # work. To do this, find the PID of a process which is running in that |
| 115 # context. The loginwindow process is a good candidate since the user | 115 # context. The loginwindow process is a good candidate since the user |
| 116 # (if logged in to a session) will definitely be running it. | 116 # (if logged in to a session) will definitely be running it. |
| 117 pid="$(find_login_window_for_user "$uid")" | 117 pid="$(find_login_window_for_user "$uid")" |
| 118 if [[ ! -n "$pid" ]]; then | 118 if [[ ! -n "$pid" ]]; then |
| 119 exit 1 | 119 exit 1 |
| 120 fi | 120 fi |
| 121 bootstrap_user="launchctl bsexec $pid" | 121 bootstrap_user="launchctl bsexec $pid" |
| 122 fi | 122 fi |
| 123 | 123 |
| 124 logger $bootstrap_user $sudo_user $load | |
| 124 $bootstrap_user $sudo_user $load | 125 $bootstrap_user $sudo_user $load |
| 126 logger $bootstrap_user $sudo_user $start | |
| 125 $bootstrap_user $sudo_user $start | 127 $bootstrap_user $sudo_user $start |
| 126 done | 128 done |
| 127 fi | 129 fi |
| OLD | NEW |