summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Page <james.page@ubuntu.com>2012-11-23 16:07:41 +0000
committerusd-importer <ubuntu-server@lists.ubuntu.com>2012-11-26 13:03:31 +0000
commitfabf71da7725fc3131e043e1c66712018b038f9e (patch)
tree72e85d3697365945203aab989d6f147bc8d776f2
parent126e0d0d42071d97771a32ba1910a65775e41e15 (diff)
downloadvyos-walinuxagent-fabf71da7725fc3131e043e1c66712018b038f9e.tar.gz
vyos-walinuxagent-fabf71da7725fc3131e043e1c66712018b038f9e.zip
001-strip-init-d.patch
No DEP3 Subject or Description header found Gbp-Pq: 001-strip-init-d.patch.
-rw-r--r--waagent27
1 files changed, 15 insertions, 12 deletions
diff --git a/waagent b/waagent
index 79070ae..ca3c0b4 100644
--- a/waagent
+++ b/waagent
@@ -2141,18 +2141,21 @@ def Install():
os.remove(GetLastPathElement(a))
shutil.move(a, ".")
Warn("Moved " + a + " -> " + LibDir + "/" + GetLastPathElement(a) )
- filename = "waagent"
- filepath = "/etc/init.d/" + filename
- distro = IsRedHat() + IsDebian() * 2 + IsSuse() * 3
- if distro == 0:
- Error("Unable to detect Linux Distribution.")
- return 1
- init = [[Init_RedHat, "chkconfig --add " + filename],
- [Init_Debian, "update-rc.d " + filename + " defaults"],
- [Init_Suse, "insserv " + filename]][distro - 1]
- SetFileContents(filepath, init[0])
- os.chmod(filepath, 0755)
- Run(init[1])
+
+ if not IsUbuntu():
+ filename = "waagent"
+ filepath = "/etc/init.d/" + filename
+ distro = IsRedHat() + IsDebian() * 2 + IsSuse() * 3
+ if distro == 0:
+ Error("Unable to detect Linux Distribution.")
+ return 1
+ init = [[Init_RedHat, "chkconfig --add " + filename],
+ [Init_Debian, "update-rc.d " + filename + " defaults"],
+ [Init_Suse, "insserv " + filename]][distro - 1]
+ SetFileContents(filepath, init[0])
+ os.chmod(filepath, 0755)
+ Run(init[1])
+
if os.path.isfile("/etc/waagent.conf"):
try:
os.remove("/etc/waagent.conf.old")