9057c27b8f
- 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: Ia81b03da3f2d4c5a36a147c152123b490843c0f6
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"])
|