From 88b003d01a337d013ce3209230d23de6843f317e Mon Sep 17 00:00:00 2001 From: Gaston Gonzalez Date: Thu, 10 Oct 2024 06:12:20 -0700 Subject: [PATCH] PnP - Disabled kill command rigtctld wrapper. Temporarily enabled a very generic remove action in the 705 udev rules to stop the rigctld systemd unit --- overlay/etc/udev/rules.d/80-et-ic705.rules | 5 ++++- overlay/opt/emcomm-tools/sbin/wrapper-rigctld.sh | 8 ++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/overlay/etc/udev/rules.d/80-et-ic705.rules b/overlay/etc/udev/rules.d/80-et-ic705.rules index 9102f96..1cf4aa5 100644 --- a/overlay/etc/udev/rules.d/80-et-ic705.rules +++ b/overlay/etc/udev/rules.d/80-et-ic705.rules @@ -1,6 +1,6 @@ # Author : Gaston Gonzalez # Date : 28 September 2024 -# Updated : 9 October 2024 +# Updated : 10 October 2024 # Purpose : udev rules for the Icom IC-705 # # Preconditions: @@ -31,4 +31,7 @@ ENV{ET_DEVICE}=="IC-705", SUBSYSTEMS=="usb", ATTRS{bInterfaceNumber}=="02", \ ENV{ET_SUBDEVICE}="GPS", GROUP="dialout", MODE="0660", SYMLINK+="et-gps", \ RUN+="/usr/bin/systemctl start rigctld" +# TODO make more specific +SUBSYSTEM=="tty", ACTION=="remove", RUN+="/usr/bin/systemctl stop rigctld" + # TODO: Add rules for sound card diff --git a/overlay/opt/emcomm-tools/sbin/wrapper-rigctld.sh b/overlay/opt/emcomm-tools/sbin/wrapper-rigctld.sh index cbb6953..b4507a8 100755 --- a/overlay/opt/emcomm-tools/sbin/wrapper-rigctld.sh +++ b/overlay/opt/emcomm-tools/sbin/wrapper-rigctld.sh @@ -37,13 +37,13 @@ start() { exit 1 fi - # check if rigctld is already running + # Check if rigctld is already running ps -ef | grep [r]igctld if [ $? -eq 0 ]; then PID=$(ps -ef | grep [r]igctld | awk '{print $2}') - et-log "Rig control is already running with process ID: ${PID}. Killing it now..." - kill -9 ${PID} - sleep 1 + et-log "Rig control is already running with process ID: ${PID}." + #kill -9 ${PID} + #sleep 1 fi # Grab rigctld values from active radio configuration