This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/python | |
# Script to set network parameters from 'vmtoolsd --cmd "info-get guestinfo.ovfenv"'. It is designed for SLES 11 SP3 | |
# Author: Willian Antunes | |
# Date of creation: September 03, 2014 | |
import os, sys, time, subprocess, re | |
from xml.dom.minidom import parseString | |
def findXmlSection(dom, sectionName): | |
sections = dom.getElementsByTagName(sectionName) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def update(dl_url, force_update=False): | |
""" | |
Attempts to download the update url in order to find if an update is needed. | |
If an update is needed, the current script is backed up and the update is | |
saved in its place. | |
""" | |
import urllib | |
import re | |
from subprocess import call | |
def compare_versions(vA, vB): |