ChrisTitusTech / linutil

Chris Titus Tech's Linux Toolbox - Linutil is a distro-agnostic toolbox designed to simplify everyday Linux tasks.
https://christitus.com
MIT License
2.73k stars 225 forks source link

Adding VM Dependencies option #342

Closed sevu11 closed 1 month ago

sevu11 commented 1 month ago

Pull Request

Title

Added VM Dependencies option

Type of Change

Description

Added a option to install virtmanager.

Testing

Tested using Distrobox. No issues identified.

Impact

Issue related to PR

Additional Information

Script will install the required virtmanger and packages. Enable services and adding user to libvirt usergroup.

Checklist

adamperkowski commented 1 month ago

Well, I was thinking more like

enable_services(){
    read -p "What services do you want to enable? ([S]ervice/[s]ocket/[a]ll/[n]one): " answer
    case $answer in
        S)
            printf "${YELLOW}Enabling LibVirt Service${RC}\n"
            ${ESCALATION_TOOL} systemctl enable --now libvirtd.service
            ${ESCALATION_TOOL} systemctl enable --now virtlogd
            ;;
        s)
            printf "${YELLOW}Enabling LibVirt Socket${RC}\n"
            ${ESCALATION_TOOL} systemctl enable --now libvirtd.socket
            ${ESCALATION_TOOL} systemctl enable --now virtlogd
            ;;
        a|A)
            printf "${YELLOW}Enabling both LibVirt Service and Socket${RC}\n"
            ${ESCALATION_TOOL} systemctl enable --now libvirtd.service
            ${ESCALATION_TOOL} systemctl enable --now libvirtd.socket
            ${ESCALATION_TOOL} systemctl enable --now virtlogd
            ;;
        n|N)
            printf "${YELLOW}Skipping Virt Services enablement${RC}\n"
            ;;
        *)
            printf "${RED}Invalid input.${RC}\n"
            enable_services
            ;;
    esac
}

But this works as well i guess.

EDIT: Sorry, didn't see the last commit. That works.

nnyyxxxx commented 1 month ago

@adamperkowski image Partial upgrades are NOT supported by Arch Linux.

adamperkowski commented 1 month ago

@nnyyxxxx You're right. Sorry didn't think. Props for catppuccin btw

sevu11 commented 1 month ago

I just want to take a moment to thank you @nnyyxxxx for the back and forth.
And of course, your input too @adamperkowski.

nnyyxxxx commented 1 month ago

@sevu11 You need to be using the provided material out of the common-script, likewise don't leave any stray package managers in the script instead use packager provided in common-script.

image image

nnyyxxxx commented 1 month ago

@sevu11 When finished mark the existing reviews as resolved so we know what is done and what's not.

sevu11 commented 1 month ago

@sevu11 When finished mark the existing reviews as resolved so we know what is done and what's not.

Will do.

sevu11 commented 1 month ago

I will close the PR and rework it the updates merged today. I will bookmark the page for all good comments when I get around to add this PR again.