Ryan Beisner c72c0bf75a Update Amulet defs, series metadata and c-h sync
- Sync charm helpers if applicable.

- Fix test executable hashbangs 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).

- Remove Precise charm series metadata if present.

- Remove Precise Amulet test definitions if present.

Change-Id: Iebca0e30342d35e9c2344d9f1f527ca9c64129d0
2016-12-06 16:40:55 +00:00

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"])