cf5f820c35
- Sync charm helpers if applicable. - Fix test executable hashbags for virtualenv prep. - Add Yakkety-Newton Amulet test definitions. - Prep Xenial-Ocata Amulet test definitions (not yet enabled). - Prep Zesty-Ocata Amulet test definitions (not yet enabled). - Add Zesty charm series metadata. - Remove Precise charm series metadata if present. - Remove Precise Amulet test definitions if present. Change-Id: I31ca7f79c5b99f3024162f7e699e20dee5b46f6d
14 lines
406 B
Python
14 lines
406 B
Python
import subprocess
|
|
|
|
|
|
def persistent_modprobe(module):
|
|
"""Load a kernel module and configure for auto-load on reboot."""
|
|
with open('/etc/modules', 'r+') as modules:
|
|
if module not in modules.read():
|
|
modules.write(module + "\n")
|
|
|
|
|
|
def update_initramfs(version='all'):
|
|
"""Updates an initramfs image."""
|
|
return subprocess.check_call(["update-initramfs", "-k", version, "-u"])
|