diff options
author | Erik Troan <ewt@redhat.com> | 2000-02-17 20:45:24 +0000 |
---|---|---|
committer | Erik Troan <ewt@redhat.com> | 2000-02-17 20:45:24 +0000 |
commit | 81c0a0cc49dc11adec2416305f51ff199d481a34 (patch) | |
tree | 34e0afaf5256eda6c7a49f8db51532374c12c3b3 /isys | |
parent | d532af8f7cf767f9c6ff20fc00f94dca649fcd72 (diff) | |
download | anaconda-81c0a0cc49dc11adec2416305f51ff199d481a34.tar.gz anaconda-81c0a0cc49dc11adec2416305f51ff199d481a34.tar.xz anaconda-81c0a0cc49dc11adec2416305f51ff199d481a34.zip |
added code to reset resolv.conf
Diffstat (limited to 'isys')
-rw-r--r-- | isys/isys.c | 11 | ||||
-rw-r--r-- | isys/isys.py | 5 |
2 files changed, 16 insertions, 0 deletions
diff --git a/isys/isys.c b/isys/isys.c index e42c07679..8dc79bf36 100644 --- a/isys/isys.c +++ b/isys/isys.c @@ -63,6 +63,7 @@ static PyObject * doDevSpaceFree(PyObject * s, PyObject * args); static PyObject * doRaidStart(PyObject * s, PyObject * args); static PyObject * doRaidStop(PyObject * s, PyObject * args); static PyObject * doConfigNetDevice(PyObject * s, PyObject * args); +static PyObject * doResetResolv(PyObject * s, PyObject * args); static PyMethodDef isysModuleMethods[] = { { "devSpaceFree", (PyCFunction) doDevSpaceFree, METH_VARARGS, NULL }, @@ -96,6 +97,7 @@ static PyMethodDef isysModuleMethods[] = { { "swapon", (PyCFunction) doSwapon, METH_VARARGS, NULL }, { "swapoff", (PyCFunction) doSwapoff, METH_VARARGS, NULL }, { "fbconprobe", (PyCFunction) doFbconProbe, METH_VARARGS, NULL }, + { "resetresolv", (PyCFunction) doResetResolv, METH_VARARGS, NULL }, { NULL } } ; @@ -1036,3 +1038,12 @@ static PyObject * doRaidStart(PyObject * s, PyObject * args) { Py_INCREF(Py_None); return Py_None; } + +static PyObject * doResetResolv(PyObject * s, PyObject * args) { + if (!PyArg_ParseTuple(args, "")) return NULL; + + res_init(); /* reinit the resolver so DNS changes take affect */ + + Py_INCREF(Py_None); + return Py_None; +} diff --git a/isys/isys.py b/isys/isys.py index b1ae060a7..013190e44 100644 --- a/isys/isys.py +++ b/isys/isys.py @@ -220,3 +220,8 @@ def compareDrives(first, second): return 0 +def configNetDevice(device, ip, netmask, gw): + return _isys.confignetdevice(device, ip, netmask, gw) + +def resetResolv(): + return _isys.resetresolv() |