Merge lp:~sergiusens/cloud-init/snappy_ssh into lp:~smoser/cloud-init/snappy

Proposed by Sergio Schvezov
Status: Merged
Merged at revision: 1041
Proposed branch: lp:~sergiusens/cloud-init/snappy_ssh
Merge into: lp:~smoser/cloud-init/snappy
Diff against target: 19 lines (+2/-2)
1 file modified
cloudinit/config/cc_snappy.py (+2/-2)
To merge this branch: bzr merge lp:~sergiusens/cloud-init/snappy_ssh
Reviewer Review Type Date Requested Status
cloud-init Commiters Pending
Review via email: mp+243439@code.launchpad.net

This proposal supersedes a proposal from 2014-12-02.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'cloudinit/config/cc_snappy.py'
2--- cloudinit/config/cc_snappy.py 2014-12-02 16:40:17 +0000
3+++ cloudinit/config/cc_snappy.py 2014-12-02 18:17:27 +0000
4@@ -88,13 +88,13 @@
5 # do something here that would enable or disable
6 not_to_be_run = "/etc/ssh/sshd_not_to_be_run"
7 if enabled:
8- util.write_file(not_to_be_run, "cloud-init\n")
9+ util.del_file(not_to_be_run)
10 # this is an indempotent operation
11 util.subp(["systemctl", "start", "ssh"])
12 else:
13 # this is an indempotent operation
14 util.subp(["systemctl", "stop", "ssh"])
15- util.del_file(not_to_be_run)
16+ util.write_file(not_to_be_run, "cloud-init\n")
17
18
19 def handle(name, cfg, cloud, log, args):

Subscribers

People subscribed via source and target branches

to all changes: