OLD | NEW |
1 # Copyright 2015 The Swarming Authors. All rights reserved. | 1 # Copyright 2015 The LUCI Authors. All rights reserved. |
2 # Use of this source code is governed by the Apache v2.0 license that can be | 2 # Use of this source code is governed by the Apache v2.0 license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 """GNU/Linux specific utility functions.""" | 5 """GNU/Linux specific utility functions.""" |
6 | 6 |
7 import os | 7 import os |
8 import pipes | 8 import pipes |
9 import platform | 9 import platform |
10 import re | 10 import re |
11 import shlex | 11 import shlex |
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
295 'Type=Application\n' | 295 'Type=Application\n' |
296 'Name=%(name)s\n' | 296 'Name=%(name)s\n' |
297 'Exec=%(cmd)s\n' | 297 'Exec=%(cmd)s\n' |
298 'Hidden=false\n' | 298 'Hidden=false\n' |
299 'NoDisplay=false\n' | 299 'NoDisplay=false\n' |
300 'Comment=Created by os_utilities.py in swarming_bot.zip\n' | 300 'Comment=Created by os_utilities.py in swarming_bot.zip\n' |
301 'X-GNOME-Autostart-enabled=true\n') % { | 301 'X-GNOME-Autostart-enabled=true\n') % { |
302 'cmd': ' '.join(pipes.quote(c) for c in command), | 302 'cmd': ' '.join(pipes.quote(c) for c in command), |
303 'name': name, | 303 'name': name, |
304 } | 304 } |
OLD | NEW |