diff options
author | Ben Howard <ben.howard@ubuntu.com> | 2012-11-14 10:59:37 -0700 |
---|---|---|
committer | usd-importer <ubuntu-server@lists.ubuntu.com> | 2012-11-15 16:03:16 +0000 |
commit | 49a663c4bc1499f974cca254a9c13016c4382a1b (patch) | |
tree | faedbd4c5107039cdb6f8c3c2eba64a9dbababcb /debian/patches/000_resolv-conf.patch | |
parent | c7b6a6ea935ab4f2dec9f29913f996d615cf2fde (diff) | |
download | vyos-walinuxagent-49a663c4bc1499f974cca254a9c13016c4382a1b.tar.gz vyos-walinuxagent-49a663c4bc1499f974cca254a9c13016c4382a1b.zip |
Import patches-unapplied version 1.1-0ubuntu1 to ubuntu/raring-proposed
Imported using git-ubuntu import.
Changelog parent: c7b6a6ea935ab4f2dec9f29913f996d615cf2fde
New changelog entries:
* New upstream version (LP: #1078074, #1077147).
* Moved upstart job to be managed by packaging.
Diffstat (limited to 'debian/patches/000_resolv-conf.patch')
-rw-r--r-- | debian/patches/000_resolv-conf.patch | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/debian/patches/000_resolv-conf.patch b/debian/patches/000_resolv-conf.patch new file mode 100644 index 0000000..23404da --- /dev/null +++ b/debian/patches/000_resolv-conf.patch @@ -0,0 +1,32 @@ +Index: wa-new/waagent +=================================================================== +--- wa-new.orig/waagent 2012-11-14 11:06:12.227371000 -0700 ++++ wa-new/waagent 2012-11-14 11:07:53.093401274 -0700 +@@ -2262,7 +2262,26 @@ + Run("rm -f " + a + "/*") + + # Clear LibDir, remove nameserver and root bash history +- for f in os.listdir(LibDir) + ["/etc/resolv.conf", "/root/.bash_history", "/var/log/waagent.log"]: ++ fileBlackList = [ "/root/.bash_history", "/var/log/waagent.log" ] ++ ++ if IsUbuntu(): ++ # Ubuntu uses resolv.conf by default, so removing /etc/resolv.conf will ++ # break resolvconf. Therefore, we check to see if resolvconf is in use, ++ # and if so, we remove the resolvconf artifacts. ++ ++ if os.path.realpath('/etc/resolv.conf') != '/run/resolvconf/resolv.conf': ++ Log("resolvconf is not configured. Removing /etc/resolv.conf") ++ fileBlackList.append('/etc/resolv.conf') ++ else: ++ Log("resolvconf is enabled; leaving /etc/resolv.conf intact") ++ resolvConfD = '/etc/resolvconf/resolv.conf.d/' ++ fileBlackList.extend([resolvConfD + 'tail', resolvConfD + 'originial' ]) ++ else: ++ fileBlackList.append(os.listdir(LibDir) + '/etc/resolv.conf') ++ ++ ++ # Clear LibDir, remove nameserver and root bash history ++ for f in os.listdir(LibDir) + fileBlackList: + try: + os.remove(f) + except: |