diff options
| author | Scott Moser <smoser@ubuntu.com> | 2012-07-11 17:00:21 -0400 |
|---|---|---|
| committer | Scott Moser <smoser@ubuntu.com> | 2012-07-11 17:00:21 -0400 |
| commit | e90670e879cdd102e91f6b4c1909992ceb89fc7e (patch) | |
| tree | 7feecaaff16fa3c33a632392d8832636fa17f0f6 /cloudinit/stages.py | |
| parent | 3ad885991d355d1a97c7b197e471369d676715fa (diff) | |
| parent | 50a5728db977ec11f3448c473a396995ea29319e (diff) | |
| download | vyos-cloud-init-e90670e879cdd102e91f6b4c1909992ceb89fc7e.tar.gz vyos-cloud-init-e90670e879cdd102e91f6b4c1909992ceb89fc7e.zip | |
add write-files module for "injecting" files (LP: #1012854)
This implements file writing via cloud-config. It also
* adjusts other code to have user/group parsing in util instead
of in stages.py,
* renames decomp_str to decomp_gzip since it is more meaningful when named
that (as thats all it can decompress).
LP: #1012854
Diffstat (limited to 'cloudinit/stages.py')
| -rw-r--r-- | cloudinit/stages.py | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/cloudinit/stages.py b/cloudinit/stages.py index 3beeb36e..2f6a566c 100644 --- a/cloudinit/stages.py +++ b/cloudinit/stages.py @@ -133,18 +133,7 @@ class Init(object): if log_file: util.ensure_file(log_file) if perms: - perms_parted = perms.split(':', 1) - u = perms_parted[0] - if len(perms_parted) == 2: - g = perms_parted[1] - else: - g = '' - u = u.strip() - g = g.strip() - if u == "-1" or u.lower() == "none": - u = None - if g == "-1" or g.lower() == "none": - g = None + u, g = util.extract_usergroup(perms) try: util.chownbyname(log_file, u, g) except OSError: |
