summaryrefslogtreecommitdiffstats
path: root/cobbler/util.py
diff options
context:
space:
mode:
Diffstat (limited to 'cobbler/util.py')
-rw-r--r--cobbler/util.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/cobbler/util.py b/cobbler/util.py
index ed18869..a851440 100644
--- a/cobbler/util.py
+++ b/cobbler/util.py
@@ -9,10 +9,18 @@ import re
import socket
import glob
import weakref
+import subprocess
re_kernel = re.compile(r'vmlinuz-(\d+)\.(\d+)\.(\d+)-(.*)')
re_initrd = re.compile(r'initrd-(\d+)\.(\d+)\.(\d+)-(.*).img')
+def get_host_ip(ip):
+ handle = subprocess.Popen("/usr/bin/gethostip %s" % ip,
+ shell=True
+ stdout=PIPE)
+ out = handle.stdout
+ results = out.read()
+ return results.split(" ")[-1]
def find_system_identifier(self,strdata):
"""