git://git.onelab.eu
/
nodemanager.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b1b42d2
)
why are we forking here? Removed fork just to write a file.
author
Faiyaz Ahmed
<faiyaza@cs.princeton.edu>
Tue, 22 Jul 2008 15:45:01 +0000
(15:45 +0000)
committer
Faiyaz Ahmed
<faiyaza@cs.princeton.edu>
Tue, 22 Jul 2008 15:45:01 +0000
(15:45 +0000)
accounts.py
patch
|
blob
|
history
diff --git
a/accounts.py
b/accounts.py
index
cb41b67
..
3413e9c
100644
(file)
--- a/
accounts.py
+++ b/
accounts.py
@@
-86,12
+86,10
@@
class Account:
if new_keys != self.keys:
self.keys = new_keys
dot_ssh = '/home/%s/.ssh' % self.name
if new_keys != self.keys:
self.keys = new_keys
dot_ssh = '/home/%s/.ssh' % self.name
- def do_installation():
- if not os.access(dot_ssh, os.F_OK): os.mkdir(dot_ssh)
- os.chmod(dot_ssh, 0700)
- tools.write_file(dot_ssh + '/authorized_keys', lambda f: f.write(new_keys))
+ if not os.access(dot_ssh, os.F_OK): os.mkdir(dot_ssh)
+ os.chmod(dot_ssh, 0700)
+ tools.write_file(dot_ssh + '/authorized_keys', lambda f: f.write(new_keys))
logger.verbose('%s: installing ssh keys' % self.name)
logger.verbose('%s: installing ssh keys' % self.name)
- tools.fork_as(self.name, do_installation)
def start(self, delay=0): pass
def stop(self): pass
def start(self, delay=0): pass
def stop(self): pass