summaryrefslogtreecommitdiff
path: root/cloudinit/util.py
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2012-06-16 08:58:54 -0700
committerJoshua Harlow <harlowja@yahoo-inc.com>2012-06-16 08:58:54 -0700
commitc409a80a9cb8ea2e972b085074bf54824e8e0ad2 (patch)
tree67f5d17bf8323d52601e2e0338b4e030115ea311 /cloudinit/util.py
parent5fefdecc1191cd96634063e7616f89b21f066203 (diff)
downloadvyos-cloud-init-c409a80a9cb8ea2e972b085074bf54824e8e0ad2.tar.gz
vyos-cloud-init-c409a80a9cb8ea2e972b085074bf54824e8e0ad2.zip
Have the ensure file function be able to take in a file permission.
Diffstat (limited to 'cloudinit/util.py')
-rw-r--r--cloudinit/util.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/cloudinit/util.py b/cloudinit/util.py
index 15444fed..ed12dada 100644
--- a/cloudinit/util.py
+++ b/cloudinit/util.py
@@ -1162,8 +1162,8 @@ def uptime():
return uptime_str
-def ensure_file(path):
- write_file(path, content='', omode="ab")
+def ensure_file(path, mode=0644):
+ write_file(path, content='', omode="ab", mode=mode)
def chmod(path, mode):