Commit d00a850
committed
(maint) Truncate file before overwriting it
Previously, we did not truncate the script when updating a variable.
Since the module only support setting variables to "YES" and "NO", the
only consequence was that when switching from "YES" to "NO" the last
character of the file was kept and we ended up with a blank line:
sshd_enable="YES"\n -> sshd_enable="NO"\n\n
With the introduction of the support of more variables for the freebsd
provider, this result however in more breakage so we have to fix it.1 parent 3aecb85 commit d00a850
File tree
2 files changed
+2
-2
lines changed- lib/puppet/provider/service
- spec/unit/provider/service
2 files changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
82 | 82 | | |
83 | 83 | | |
84 | 84 | | |
85 | | - | |
| 85 | + | |
86 | 86 | | |
87 | 87 | | |
88 | 88 | | |
| |||
0 commit comments