diff options
author | Scott Moser <smoser@ubuntu.com> | 2010-07-01 20:48:40 -0400 |
---|---|---|
committer | Scott Moser <smoser@ubuntu.com> | 2010-07-01 20:48:40 -0400 |
commit | f5b9a7353bac21640d7d2b2868c8027ee9b5a34e (patch) | |
tree | 663c64eb84b90ade83532e2a1830efa7de3fca77 /cloudinit/__init__.py | |
parent | e3152a8ceabf4b48ee111a475a5b9e04bbbd47fd (diff) | |
download | vyos-cloud-init-f5b9a7353bac21640d7d2b2868c8027ee9b5a34e.tar.gz vyos-cloud-init-f5b9a7353bac21640d7d2b2868c8027ee9b5a34e.zip |
fix removal of '#cloud-boothook' inside a boothook
The goal was to remove '#cloud-boothook' from a part if the part
started that way. This was to allow user data of
#cloud-boothook
#!/usr/bin/perl
...
to be handled correctly. That had 2 bugs
1.) the prefix string was wrong
2.) was checking for '\r' in the wrong location
Diffstat (limited to 'cloudinit/__init__.py')
-rw-r--r-- | cloudinit/__init__.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cloudinit/__init__.py b/cloudinit/__init__.py index 8661b459..a5df3436 100644 --- a/cloudinit/__init__.py +++ b/cloudinit/__init__.py @@ -421,11 +421,11 @@ class CloudInit: if ctype == "__begin__": return filename=filename.replace(os.sep,'_') - prefix="#cloud-boothooks" + prefix="#cloud-boothook" dos=False start = 0 if payload.startswith(prefix): - start = len(prefix)+1 + start = len(prefix) if payload[start] == '\r': start=start+1 dos = True |