mirror of
https://github.com/thetechprepper/emcomm-tools-os-community.git
synced 2026-09-17 15:41:44 -04:00
PnP - This is a WiP. Set shell to /bin/bash for new users; Added radio model to Conky display; Added initial rigctld wrapper script; Added active-radio command to et-system-info; Fixed missing ET_HOME env variable in rigctld wrapper; Added et user; Added CAT controller installer
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
# The DSHELL variable specifies the default login shell on your
|
# The DSHELL variable specifies the default login shell on your
|
||||||
# system.
|
# system.
|
||||||
#DSHELL=/bin/bash
|
DSHELL=/bin/bash
|
||||||
|
|
||||||
# The DHOME variable specifies the directory containing users' home
|
# The DHOME variable specifies the directory containing users' home
|
||||||
# directories.
|
# directories.
|
||||||
|
|||||||
@@ -17,15 +17,17 @@ conky.config = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
conky.text = [[
|
conky.text = [[
|
||||||
${font DejaVu Sans Mono:size=14}${alignc}${time %A, %B %d %Y}
|
${font DejaVu Sans Mono:size=12}${alignc}${time %A, %B %d %Y}
|
||||||
Local: ${alignr}${time %H:%M:%S}
|
Local: ${alignr}${time %H:%M:%S}
|
||||||
UTC: ${alignr}${tztime UTC %H:%M:%S}
|
UTC: ${alignr}${tztime UTC %H:%M:%S}
|
||||||
Uptime: ${uptime}
|
Uptime: ${uptime}
|
||||||
|
|
||||||
IP: ${execpi 60 /opt/emcomm-tools/bin/et-system-info ip}
|
IP: ${execpi 60 /opt/emcomm-tools/bin/et-system-info ip}
|
||||||
|
|
||||||
${execp /opt/emcomm-tools/bin/et-system-info release}
|
Radio: ${execpi 10 et-system-info active-radio}
|
||||||
CAT: ${execpi 15 /opt/emcomm-tools/bin/et-system-info et-cat}
|
CAT : ${execpi 10 et-system-info et-cat}
|
||||||
GPS: ${execpi 15 /opt/emcomm-tools/bin/et-system-info et-gps}
|
GPS : ${execpi 10 et-system-info et-gps}
|
||||||
|
|
||||||
|
${font DejaVu Sans Mono:size=10}${alignc}${execp /opt/emcomm-tools/bin/et-system-info release}
|
||||||
]];
|
]];
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
# Author : Gaston Gonzalez
|
# Author : Gaston Gonzalez
|
||||||
# Date : 28 September 2024
|
# Date : 28 September 2024
|
||||||
# Updated : 5 October 2024
|
# Updated : 9 October 2024
|
||||||
# Purpose : udev rules for the Icom IC-705
|
# Purpose : udev rules for the Icom IC-705
|
||||||
#
|
#
|
||||||
# Preconditions:
|
# Preconditions:
|
||||||
@@ -9,6 +9,7 @@
|
|||||||
# Postconditions:
|
# Postconditions:
|
||||||
# 1. /dev/et-cat created
|
# 1. /dev/et-cat created
|
||||||
# 2. /dev/et-gps created
|
# 2. /dev/et-gps created
|
||||||
|
# 3. rigctld is started
|
||||||
#
|
#
|
||||||
# Resources
|
# Resources
|
||||||
# - https://www.florian-wolters.de/posts/ic705-serial-device-symlinks/
|
# - https://www.florian-wolters.de/posts/ic705-serial-device-symlinks/
|
||||||
@@ -21,12 +22,13 @@ KERNEL=="ttyACM[0-9]*", SUBSYSTEM=="tty", ATTRS{product}=="IC-705", \
|
|||||||
# Create consistent device name/path for the CAT serial device
|
# Create consistent device name/path for the CAT serial device
|
||||||
ENV{ET_DEVICE}=="IC-705", SUBSYSTEMS=="usb", ATTRS{bInterfaceNumber}=="00", \
|
ENV{ET_DEVICE}=="IC-705", SUBSYSTEMS=="usb", ATTRS{bInterfaceNumber}=="00", \
|
||||||
ACTION=="add", \
|
ACTION=="add", \
|
||||||
ENV{ET_SUBDEVICE}="CAT", GROUP="dialout", MODE="0660", SYMLINK+="et-cat"
|
ENV{ET_SUBDEVICE}="CAT", GROUP="dialout", MODE="0660", SYMLINK+="et-cat", \
|
||||||
|
RUN+="/opt/emcomm-tools/sbin/wrapper-rigtctld.sh start"
|
||||||
|
|
||||||
# Create consistent device name/path for the GPS serial device
|
# Create consistent device name/path for the GPS serial device
|
||||||
ENV{ET_DEVICE}=="IC-705", SUBSYSTEMS=="usb", ATTRS{bInterfaceNumber}=="02", \
|
ENV{ET_DEVICE}=="IC-705", SUBSYSTEMS=="usb", ATTRS{bInterfaceNumber}=="02", \
|
||||||
ACTION=="add", \
|
ACTION=="add", \
|
||||||
ENV{ET_SUBDEVICE}="GPS", GROUP="dialout", MODE="0660", SYMLINK+="et-gps", \
|
ENV{ET_SUBDEVICE}="GPS", GROUP="dialout", MODE="0660", SYMLINK+="et-gps", \
|
||||||
RUN+="/opt/emcomm-tools/sbin/wrapper-gpsd.sh start"
|
RUN+="/usr/bin/systemctl start rigctld"
|
||||||
|
|
||||||
# TODO: Add rules for sound card
|
# TODO: Add rules for sound card
|
||||||
|
|||||||
@@ -0,0 +1,12 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=rigctld service
|
||||||
|
ConditionPathExists=/dev/et-cat
|
||||||
|
After=multi-user.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
User=et
|
||||||
|
ExecStart=/opt/emcomm-tools/sbin/wrapper-rigtctld.sh start
|
||||||
|
SuccessExitStatus=143
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
@@ -2,14 +2,16 @@
|
|||||||
#
|
#
|
||||||
# Author : Gaston Gonzalez
|
# Author : Gaston Gonzalez
|
||||||
# Date : 6 October 2024
|
# Date : 6 October 2024
|
||||||
|
# Updated : 10 October 2024
|
||||||
# Purpose : Utility script for dumping system information
|
# Purpose : Utility script for dumping system information
|
||||||
|
|
||||||
function usage() {
|
function usage() {
|
||||||
echo "Usage: $(basename $0) <command>"
|
echo "Usage: $(basename $0) <command>"
|
||||||
echo " et-cat - Is CAT control connected"
|
echo " active-radio - Display model of active radio"
|
||||||
echo " et-gps - Is the GPS connected"
|
echo " et-cat - Is CAT control connected"
|
||||||
echo " ip - System IP address"
|
echo " et-gps - Is the GPS connected"
|
||||||
echo " release - EmComm Tools Release"
|
echo " ip - System IP address"
|
||||||
|
echo " release - EmComm Tools Release"
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ $# -ne 1 ]; then
|
if [ $# -ne 1 ]; then
|
||||||
@@ -18,6 +20,13 @@ if [ $# -ne 1 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
|
active-radio)
|
||||||
|
if [ -L "${ET_HOME}/conf/radios.d/active-radio.json" ]; then
|
||||||
|
cat /opt/emcomm-tools/conf/radios.d/active-radio.json | jq -r .model
|
||||||
|
else
|
||||||
|
echo "None"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
et-cat)
|
et-cat)
|
||||||
if [ -e /dev/et-cat ]; then echo "Yes"; else echo "No"; fi
|
if [ -e /dev/et-cat ]; then echo "Yes"; else echo "No"; fi
|
||||||
;;
|
;;
|
||||||
|
|||||||
@@ -4,20 +4,21 @@
|
|||||||
# Date : 9 October 2024
|
# Date : 9 October 2024
|
||||||
# Purpose : Wrapper startup/shutdown script around systemd/rigctld
|
# Purpose : Wrapper startup/shutdown script around systemd/rigctld
|
||||||
|
|
||||||
|
ET_HOME=/opt/emcomm-tools
|
||||||
ACTIVE_RADIO="${ET_HOME}/conf/radios.d/active-radio.json"
|
ACTIVE_RADIO="${ET_HOME}/conf/radios.d/active-radio.json"
|
||||||
CAT_DEVICE=/dev/et-cat
|
CAT_DEVICE=/dev/et-cat
|
||||||
|
|
||||||
do_full_auto() {
|
do_full_auto() {
|
||||||
et-log "Found ET_DEVICE=$ET_DEVICE"
|
et-log "Found ET_DEVICE='${ET_DEVICE}'"
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
IC-705)
|
IC-705)
|
||||||
echo "Automatically configuring $1.."
|
echo "Automatically configuring $1..."
|
||||||
if [ -L ${ACTIVE_RADIO} ]; then
|
if [ -L ${ACTIVE_RADIO} ]; then
|
||||||
rm -v ${ACTIVE_RADIO}
|
rm -v ${ACTIVE_RADIO}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
ln -v -s /opt/emcomm-tools/conf/radios.d/icom-ic705.json ${ACTIVE_RADIO}
|
ln -v -s ${ET_HOME}/conf/radios.d/icom-ic705.json ${ACTIVE_RADIO}
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
et-log "Full auto configuration not available for ET_DEVICE=$1"
|
et-log "Full auto configuration not available for ET_DEVICE=$1"
|
||||||
@@ -40,7 +41,7 @@ start() {
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -L ${ACTIVE_RADIO} ]; then
|
if [ ! -L ${ACTIVE_RADIO} ]; then
|
||||||
et-log "No active defined. ${ACTIVE_RADIO} symlink is missing."
|
et-log "No active radio defined. ${ACTIVE_RADIO} symlink is missing."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|||||||
@@ -6,10 +6,14 @@
|
|||||||
# Purpose : Configure users and groups
|
# Purpose : Configure users and groups
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
ET_GID=1981
|
||||||
|
|
||||||
et-log "Adding '${ET_GROUP}' group..."
|
et-log "Adding '${ET_GROUP}' group..."
|
||||||
groupadd -g 1981 ${ET_GROUP}
|
groupadd -g ${ET_GID} ${ET_GROUP}
|
||||||
|
|
||||||
et-log "Configuring users..."
|
et-log "Configuring users..."
|
||||||
|
et-log "Adding et system user..."
|
||||||
|
useradd -m -s /bin/bash et
|
||||||
|
|
||||||
cp -r ../overlay/etc/skel /etc/
|
cp -r ../overlay/etc/skel /etc/
|
||||||
[ ! -e /etc/skel/Desktop ] && mkdir /etc/skel/Desktop
|
[ ! -e /etc/skel/Desktop ] && mkdir /etc/skel/Desktop
|
||||||
|
|||||||
Executable
+12
@@ -0,0 +1,12 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
#
|
||||||
|
# Author : Gaston Gonzalez
|
||||||
|
# Date : 9 October 2024
|
||||||
|
# Purpose : Install script for CAT control
|
||||||
|
|
||||||
|
et-log "Updating CAT control systemd script..."
|
||||||
|
cp ../overlay/lib/systemd/system/rigctld.service /lib/systemd/system/
|
||||||
|
systemctl daemon-reload
|
||||||
|
|
||||||
|
et-log "Disable automatic start of rigctl..."
|
||||||
|
systemctl disable rigctld
|
||||||
+2
-1
@@ -2,7 +2,7 @@
|
|||||||
#
|
#
|
||||||
# Author : Gaston Gonzalez
|
# Author : Gaston Gonzalez
|
||||||
# Date : 16 March 2024
|
# Date : 16 March 2024
|
||||||
# Updated : 6 October 2024
|
# Updated : 9 October 2024
|
||||||
# Purpose : Main installer for EmComm Tools OS Community
|
# Purpose : Main installer for EmComm Tools OS Community
|
||||||
|
|
||||||
. ./env.sh
|
. ./env.sh
|
||||||
@@ -31,5 +31,6 @@ exitIfNotRoot
|
|||||||
./install-udev.sh
|
./install-udev.sh
|
||||||
./install-gps.sh
|
./install-gps.sh
|
||||||
./install-navit.sh
|
./install-navit.sh
|
||||||
|
./install-cat.sh
|
||||||
|
|
||||||
./install-conky.sh
|
./install-conky.sh
|
||||||
|
|||||||
Reference in New Issue
Block a user