From f5b9a7353bac21640d7d2b2868c8027ee9b5a34e Mon Sep 17 00:00:00 2001 From: Scott Moser Date: Thu, 1 Jul 2010 20:48:40 -0400 Subject: 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 --- cloudinit/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cloudinit') 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 -- cgit v1.2.3