linutil icon indicating copy to clipboard operation
linutil copied to clipboard

Adding VM Dependencies option

Open avaera8775 opened this issue 1 year ago • 7 comments

Pull Request

Title

Added VM Dependencies option

Type of Change

  • [x] New feature
  • [ ] Bug fix
  • [ ] Documentation Update
  • [ ] Refactoring
  • [ ] Hotfix
  • [ ] Security patch
  • [ ] UI/UX improvement

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

  • [x] My code adheres to the coding and style guidelines of the project.
  • [x] I have performed a self-review of my own code.
  • [x] I have commented my code, particularly in hard-to-understand areas.
  • [ ] I have made corresponding changes to the documentation.
  • [ ] My changes generate no errors/warnings/merge conflicts.

avaera8775 avatar Sep 11 '24 16:09 avaera8775

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.

adamperkowski avatar Sep 11 '24 16:09 adamperkowski

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

ghost avatar Sep 11 '24 16:09 ghost

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

adamperkowski avatar Sep 11 '24 16:09 adamperkowski

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

avaera8775 avatar Sep 11 '24 16:09 avaera8775

@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

ghost avatar Sep 11 '24 16:09 ghost

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

ghost avatar Sep 11 '24 17:09 ghost

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

Will do.

avaera8775 avatar Sep 11 '24 17:09 avaera8775

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.

avaera8775 avatar Sep 12 '24 18:09 avaera8775