mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-10-10 17:19:51 +00:00
Minor cleanup in network module
This commit is contained in:
parent
f9ebd247e8
commit
cb011dabf3
1 changed files with 3 additions and 7 deletions
|
@ -1,6 +1,6 @@
|
||||||
from base import Task
|
from base import Task
|
||||||
from common import phases
|
from common import phases
|
||||||
import os.path
|
import os
|
||||||
|
|
||||||
|
|
||||||
class RemoveDNSInfo(Task):
|
class RemoveDNSInfo(Task):
|
||||||
|
@ -9,10 +9,8 @@ class RemoveDNSInfo(Task):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def run(cls, info):
|
def run(cls, info):
|
||||||
from os import remove
|
|
||||||
import os.path
|
|
||||||
if os.path.isfile(os.path.join(info.root, 'etc/resolv.conf')):
|
if os.path.isfile(os.path.join(info.root, 'etc/resolv.conf')):
|
||||||
remove(os.path.join(info.root, 'etc/resolv.conf'))
|
os.remove(os.path.join(info.root, 'etc/resolv.conf'))
|
||||||
|
|
||||||
|
|
||||||
class RemoveHostname(Task):
|
class RemoveHostname(Task):
|
||||||
|
@ -21,10 +19,8 @@ class RemoveHostname(Task):
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def run(cls, info):
|
def run(cls, info):
|
||||||
from os import remove
|
|
||||||
import os.path
|
|
||||||
if os.path.isfile(os.path.join(info.root, 'etc/hostname')):
|
if os.path.isfile(os.path.join(info.root, 'etc/hostname')):
|
||||||
remove(os.path.join(info.root, 'etc/hostname'))
|
os.remove(os.path.join(info.root, 'etc/hostname'))
|
||||||
|
|
||||||
|
|
||||||
class ConfigureNetworkIF(Task):
|
class ConfigureNetworkIF(Task):
|
||||||
|
|
Loading…
Add table
Reference in a new issue