Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Automates uninstallation method #197

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

celowsky
Copy link

@celowsky celowsky commented Jan 27, 2021

Summary

In response to #83 regarding uninstallation difficulties, this PR introduces a bash script to automate uninstall of the logiops driver and disable it in systemd.

Testing Instructions

  1. Install the driver as described in the repo's README.
  2. Enable it in systemd.
  3. Restart your machine.
  4. Confirm the daemon has started with systemctl status logid.
  5. In a terminal, navigate to the project's root directory and run ./uninstall.sh.
  6. Confirm the driver and it's daemon are no longer present on the system.

@PixlOne PixlOne force-pushed the main branch 14 times, most recently from a062ed0 to a77b328 Compare May 4, 2023 05:32
Copy link

@Flimm Flimm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having an uninstall script is essential, so thank you for doing this work! I've left some comments on some bugs that I found.

}

get_manifest_path() {
local manifest_path=$(find . -name 'install-manifest.txt' -type f -print)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The file is named install_manifest.txt , not install-manifest.txt , at least when I tried it.


get_manifest_path() {
local manifest_path=$(find . -name 'install-manifest.txt' -type f -print)
if [ 1 -lt ${#manifest_path} ]; then
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what this line is meant to do. Is it checking for an empty string? It doesn't seem to work as intended for me.

get_manifest_path() {
local manifest_path=$(find . -name 'install-manifest.txt' -type f -print)
if [ 1 -lt ${#manifest_path} ]; then
printf '%s\n' "This repo has not been built yet. Please build it to generate install-manifest.txt. Continuing..."
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be good if this error got printed to stderr, to avoid corrupting the result of $(get_manifest_path)

echo "manifest_path is $manifest_path"
while IFS= read -r line; do
printf '%s\n' "Removing $line.."
rm "$line"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line needs to be preceded with sudo to avoid a "permission denied" error. Or the whole script needs to be run with sudo .
It also may need a -f to stop an error code from causing this function to exit early, since set -e has been set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants