Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE
/
agent
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
7
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
35799cc8
authored
Oct 16, 2014
by
Bach Dániel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
random fixes
parent
e1bb82f6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
linux/_linuxcontext.py
+1
-1
linux/network.py
+6
-1
No files found.
linux/_linuxcontext.py
View file @
35799cc8
...
...
@@ -228,7 +228,7 @@ class Context(BaseContext):
@staticmethod
def
update
(
filename
,
executable
,
checksum
,
uuid
):
new_dir
=
working_directory
+
'.new'
old_dir
=
working_directory
+
'.old
'
old_dir
=
working_directory
+
'.old
.
%
s'
%
uuid
with
open
(
filename
,
"r"
)
as
f
:
data
=
f
.
read
()
local_checksum
=
md5
(
data
)
.
hexdigest
()
...
...
linux/network.py
View file @
35799cc8
...
...
@@ -2,6 +2,7 @@ import netifaces
from
netaddr
import
IPNetwork
import
fileinput
import
logging
import
subprocess
logger
=
logging
.
getLogger
()
...
...
@@ -35,9 +36,13 @@ def remove_interfaces_ubuntu(devices):
continue
if
words
[
0
]
==
'iface'
:
if
words
[
1
]
.
split
(
':'
)[
0
]
in
devices
:
ifname
=
words
[
1
]
.
split
(
':'
)[
0
]
if
ifname
in
devices
:
# remove line
delete_device
=
True
subprocess
.
call
((
'/sbin/ip'
,
'addr'
,
'flush'
,
'dev'
,
ifname
))
subprocess
.
call
((
'/sbin/ip'
,
'link'
,
'set'
,
'dev'
,
ifname
,
'down'
))
continue
else
:
delete_device
=
False
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment