Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(123)

Side by Side Diff: enterprise_helper_linux.py

Issue 7453062: Added another class 'EnterpriseTestSetTwo'to test another set of policy values. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/chrome/test/functional/
Patch Set: '' Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « enterprise.py ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 # Helper script to copy policy files into 5 # Helper script to copy policy files into
6 # the correct managed policy location in the machine 6 # the correct managed policy location in the machine
7 7
8 import os 8 import os
9 import sys 9 import sys
10 import shutil 10 import shutil
11 11
12 12
13 def main(): 13 def main():
14 assert os.geteuid() == 0, 'Need superuser privileges' 14 assert os.geteuid() == 0, 'Need superuser privileges'
15 if sys.argv[1] == 'copy': 15 if sys.argv[1] == 'copy':
16 shutil.copy(sys.argv[2], sys.argv[3]) 16 shutil.copy(sys.argv[2], sys.argv[3])
17 filename = os.path.join(sys.argv[3], 'chrome.json') 17 dirList = os.listdir(sys.argv[3])
18 os.chmod(filename, 0755) 18 for fname in dirList:
19 filename = os.path.join(sys.argv[3], fname)
20 os.chmod(filename, 0755)
19 elif sys.argv[1] == 'setup_dir': 21 elif sys.argv[1] == 'setup_dir':
20 os.system('mkdir -p %s' % sys.argv[2]) 22 os.system('mkdir -p %s' % sys.argv[2])
21 os.system('chmod -R 755 /etc/opt/chrome/') 23 os.system('chmod -R 755 /etc/opt/chrome/')
22 elif sys.argv[1] == 'remove_dir': 24 elif sys.argv[1] == 'remove_dir':
23 os.system('rm -rf %s' % sys.argv[2]) 25 os.system('rm -rf %s' % sys.argv[2])
24 else: 26 else:
25 print >>sys.stderr, 'Invalid syntax. Possible values are [copy], \ 27 print >>sys.stderr, 'Invalid syntax. Possible values are [copy], \
26 [setup_dir], [remove_dir]' 28 [setup_dir], [remove_dir]'
27 29
28 30
29 if __name__ == '__main__': 31 if __name__ == '__main__':
30 main() 32 main()
OLDNEW
« no previous file with comments | « enterprise.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698