diff options
author | James Page <james.page@ubuntu.com> | 2012-11-23 16:07:41 +0000 |
---|---|---|
committer | usd-importer <ubuntu-server@lists.ubuntu.com> | 2012-11-26 13:03:31 +0000 |
commit | fabf71da7725fc3131e043e1c66712018b038f9e (patch) | |
tree | 72e85d3697365945203aab989d6f147bc8d776f2 | |
parent | 126e0d0d42071d97771a32ba1910a65775e41e15 (diff) | |
download | vyos-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-- | waagent | 27 |
1 files changed, 15 insertions, 12 deletions
@@ -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") |