summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--isys/isys.c14
-rw-r--r--isys/isys.py3
2 files changed, 17 insertions, 0 deletions
diff --git a/isys/isys.c b/isys/isys.c
index 1f91adc00..2d654f9af 100644
--- a/isys/isys.c
+++ b/isys/isys.c
@@ -17,6 +17,7 @@
#include <sys/time.h>
#include <sys/vfs.h>
#include <unistd.h>
+#include <resolv.h>
#include "Python.h"
@@ -63,6 +64,7 @@ static PyObject * doRaidStop(PyObject * s, PyObject * args);
static PyObject * doConfigNetDevice(PyObject * s, PyObject * args);
static PyObject * doPumpNetDevice(PyObject * s, PyObject * args);
static PyObject * doResetResolv(PyObject * s, PyObject * args);
+static PyObject * doSetResolvRetry(PyObject * s, PyObject * args);
static PyObject * doLoadFont(PyObject * s, PyObject * args);
static PyObject * doLoadKeymap(PyObject * s, PyObject * args);
@@ -100,6 +102,7 @@ static PyMethodDef isysModuleMethods[] = {
{ "swapoff", (PyCFunction) doSwapoff, METH_VARARGS, NULL },
{ "fbconprobe", (PyCFunction) doFbconProbe, METH_VARARGS, NULL },
{ "resetresolv", (PyCFunction) doResetResolv, METH_VARARGS, NULL },
+ { "setresretry", (PyCFunction) doSetResolvRetry, METH_VARARGS, NULL },
{ "loadFont", (PyCFunction) doLoadFont, METH_VARARGS, NULL },
{ "loadKeymap", (PyCFunction) doLoadKeymap, METH_VARARGS, NULL },
{ NULL }
@@ -1120,3 +1123,14 @@ static PyObject * doResetResolv(PyObject * s, PyObject * args) {
Py_INCREF(Py_None);
return Py_None;
}
+
+static PyObject * doSetResolvRetry(PyObject * s, PyObject * args) {
+ int count;
+
+ if (!PyArg_ParseTuple(args, "i", &count)) return NULL;
+
+ _res.retry = count;
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
diff --git a/isys/isys.py b/isys/isys.py
index a96ad6903..cf86bae78 100644
--- a/isys/isys.py
+++ b/isys/isys.py
@@ -232,6 +232,9 @@ def configNetDevice(device, ip, netmask, gw):
def resetResolv():
return _isys.resetresolv()
+def setResolvRetry(count):
+ return _isys.setresretry(count)
+
def pumpNetDevice(device):
# returns None on failure, "" if no nameserver is found, nameserver IP
# otherwise