EmixamPP / linux-enable-ir-emitter

Provides support for infrared cameras that are not directly enabled out-of-the box.
MIT License
242 stars 21 forks source link

Add `pre_remove` #59

Closed supdrewin closed 3 years ago

supdrewin commented 3 years ago

Changes:

diff --git a/AUR/git/linux-enable-ir-emitter.install b/AUR/git/linux-enable-ir-emitter.install
index 0f30514..c7cafdd 100644
--- a/AUR/git/linux-enable-ir-emitter.install
+++ b/AUR/git/linux-enable-ir-emitter.install
@@ -1,3 +1,8 @@
+pre_remove() {
+  # disable service and remove targets
+  linux-enable-ir-emitter boot disable
+}
+
 post_remove() {
   # delete files added after user configure
   rm -f /etc/linux-enable-ir-emitter.yaml
diff --git a/AUR/release/linux-enable-ir-emitter.install b/AUR/release/linux-enable-ir-emitter.install
index 0f30514..c7cafdd 100644
--- a/AUR/release/linux-enable-ir-emitter.install
+++ b/AUR/release/linux-enable-ir-emitter.install
@@ -1,3 +1,8 @@
+pre_remove() {
+  # disable service and remove targets
+  linux-enable-ir-emitter boot disable
+}
+
 post_remove() {
   # delete files added after user configure
   rm -f /etc/linux-enable-ir-emitter.yaml
diff --git a/sources/command/configure.py b/sources/command/configure.py
index 82d10f7..dabf263 100644
--- a/sources/command/configure.py
+++ b/sources/command/configure.py
@@ -17,7 +17,7 @@ def execute(device: str, neg_answer_limit: int) -> None:

     driver_generator = DriverGenerator(device, neg_answer_limit)

-    logging.info("Warning to do not kill the processus !")
+    logging.info("Warning to do not kill the processes !")
     try:
         driver_generator.generate()
         if driver_generator.driver: