backend Package¶
keyboard
Module¶
Keyboard utilities
media
Module¶
utils
Module¶
Collection of small utilities.
-
class
vinstall.backend.utils.
Chroot
(new_root, chdir=True)[source]¶ Bases:
object
Execute block in a chrooted context
>>> with Chroot("/mnt"): ... dostuff()
If chdir kwarg is True, os.chdir to “/” before entering
-
vinstall.backend.utils.
exec_chroot
(root, command)[source]¶ Change the root dir for current shell and run the given command.
Arguments:
dir: The directory to for chrooting to. command: The command to be executed under the new root.>>> exec_chroot('/', 'pwd') 0
-
vinstall.backend.utils.
format_partition
(path, filesystem)[source]¶ Create a filesystem in a partition using mkfs.
-
vinstall.backend.utils.
get_existing_fs
(partition_path)[source]¶ Return the FS for a (mounted) mountpoint
-
vinstall.backend.utils.
mount
(src, mountpoint, filesystem='auto')[source]¶ Mount a filesystem.
Arguments:
src: the filesystem or device to be mounted. filesystem: filesystem type passed to the mount command, for example:
“ext3”. Default is auto.
-
vinstall.backend.utils.
mountiso
(src, mountpoint)[source]¶ Mount a filesystem.
Arguments:
src: the filesystem or device to be mounted. extra: extra options to be passed to the mount command, for example:
“-o loop”. Default is None.- filesystem: filesystem type passed to the mount command, for example:
- “ext3”. Default is auto.