INNER CODE UNIT · Python
install_packages
LINBIT/linstor-server · scripts/linstor-controller-ha-setup.py:287
def install_packages(packages, missing_desc, assume_yes=False):
"""Offer to install missing packages from the repositories ALREADY
configured on this node (typically the LINBIT customer repo or the
drbd-9 PPA). This never adds a repository — picking the right source is
deployment-specific, and drbd-dkms builds a kernel module.
--yes covers this too: a run that promised not to ask anything cannot then
stop at a prompt, which is also what makes the script usable unattended.
"""
hint = ("install them from your LINBIT repository (or "
"ppa:linbit/linbit-drbd9-stack on Ubuntu) and re-run this script")
name, install, _ = pkg_manager()
print("missing on this node: " + missing_desc)
if name is None:
die("no supported package manager found (apt-get/dnf/yum/zypper) — "
+ hint)
print("Packages to install with " + name + ": " + " ".join(packages))
print("They are taken from the repositories already configured here; "