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 logger Restoring _enabled file |
63 mv "$ENABLED_FILE_BACKUP" "$ENABLED_FILE" | 64 mv "$ENABLED_FILE_BACKUP" "$ENABLED_FILE" |
64 fi | 65 fi |
65 | 66 |
66 # Create the PAM configuration unless it already exists and has been edited. | 67 # Create the PAM configuration unless it already exists and has been edited. |
67 update_pam=1 | 68 update_pam=1 |
68 CONTROL_LINE="# If you edit this file, please delete this line." | 69 CONTROL_LINE="# If you edit this file, please delete this line." |
69 if [[ -f "$PAM_CONFIG" ]] && ! grep -qF "$CONTROL_LINE" "$PAM_CONFIG"; then | 70 if [[ -f "$PAM_CONFIG" ]] && ! grep -qF "$CONTROL_LINE" "$PAM_CONFIG"; then |
70 update_pam=0 | 71 update_pam=0 |
71 fi | 72 fi |
72 | 73 |
(...skipping 41 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 | 115 # 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 | 116 # context. The loginwindow process is a good candidate since the user |
116 # (if logged in to a session) will definitely be running it. | 117 # (if logged in to a session) will definitely be running it. |
117 pid="$(find_login_window_for_user "$uid")" | 118 pid="$(find_login_window_for_user "$uid")" |
118 if [[ ! -n "$pid" ]]; then | 119 if [[ ! -n "$pid" ]]; then |
119 exit 1 | 120 exit 1 |
120 fi | 121 fi |
121 bootstrap_user="launchctl bsexec $pid" | 122 bootstrap_user="launchctl bsexec $pid" |
122 fi | 123 fi |
123 | 124 |
| 125 logger $bootstrap_user $sudo_user $load |
124 $bootstrap_user $sudo_user $load | 126 $bootstrap_user $sudo_user $load |
| 127 logger $bootstrap_user $sudo_user $start |
125 $bootstrap_user $sudo_user $start | 128 $bootstrap_user $sudo_user $start |
126 done | 129 done |
127 fi | 130 fi |
OLD | NEW |