summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Howard <ben.howard@ubuntu.com>2012-11-14 10:59:37 -0700
committerusd-importer <ubuntu-server@lists.ubuntu.com>2012-11-15 16:03:16 +0000
commita1061b7fbd4cf0a999b23622d139fa6f95de7a14 (patch)
tree9eefea25850e2c4797e8f44576cb332033c0f407
parent3ea0baa1d61ba26b51fb5f88d70f85d19db2bd70 (diff)
downloadvyos-walinuxagent-a1061b7fbd4cf0a999b23622d139fa6f95de7a14.tar.gz
vyos-walinuxagent-a1061b7fbd4cf0a999b23622d139fa6f95de7a14.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")