Revision f165adc0 image_creator/os_type/linux.py
b/image_creator/os_type/linux.py | ||
---|---|---|
31 | 31 |
# interpreted as representing official policies, either expressed |
32 | 32 |
# or implied, of GRNET S.A. |
33 | 33 |
|
34 |
from image_creator.os_type.unix import Unix, exclude_task
|
|
34 |
from image_creator.os_type.unix import Unix, sysprep
|
|
35 | 35 |
from image_creator.util import warn, output |
36 | 36 |
|
37 | 37 |
import re |
... | ... | |
56 | 56 |
self._uuid[dev] = attr[1] |
57 | 57 |
return attr[1] |
58 | 58 |
|
59 |
def sysprep_fix_acpid(self, print_header=True): |
|
59 |
@sysprep() |
|
60 |
def fix_acpid(self, print_header=True): |
|
60 | 61 |
"""Replace acpid powerdown action scripts to immediately shutdown the |
61 | 62 |
system without checking if a GUI is running. |
62 | 63 |
""" |
... | ... | |
110 | 111 |
"event occures" % action) |
111 | 112 |
return |
112 | 113 |
|
113 |
def sysprep_persistent_net_rules(self, print_header=True): |
|
114 |
@sysprep() |
|
115 |
def persistent_net_rules(self, print_header=True): |
|
114 | 116 |
"""Remove udev rules that will keep network interface names persistent |
115 | 117 |
after hardware changes and reboots. Those rules will be created again |
116 | 118 |
the next time the image runs. |
... | ... | |
123 | 125 |
if self.g.is_file(rule_file): |
124 | 126 |
self.g.rm(rule_file) |
125 | 127 |
|
126 |
def sysprep_persistent_devs(self, print_header=True): |
|
127 |
"""Scan fstab and grub configuration files and replace all |
|
128 |
non-persistent device appearences with UUIDs. |
|
128 |
@sysprep() |
|
129 |
def persistent_devs(self, print_header=True): |
|
130 |
"""Scan fstab & grub configuration files and replace all non-persistent |
|
131 |
device appearences with UUIDs. |
|
129 | 132 |
""" |
130 | 133 |
|
131 | 134 |
if print_header: |
Also available in: Unified diff