Move operating system detection to sxmo_common

Signed-off-by: Stacy Harper <contact@stacyharper.net>
master
Maxim Karasev 3 years ago committed by Stacy Harper
parent 2e965453c1
commit f7698e4a25
No known key found for this signature in database
GPG Key ID: 5BAC92328B7C5D65
  1. 10
      scripts/core/sxmo_common.sh
  2. 8
      scripts/modem/sxmo_modemmonitortoggle.sh

@ -9,6 +9,16 @@
# we disable shellcheck SC2034 (variable not used)
# for all the variables we define here
# Determine current operating system
if [ -f /etc/os-release ]; then
# freedesktop.org and systemd
# shellcheck disable=SC2034
. /etc/os-release
export OS="$NAME"
else
export OS="Unknown"
fi
# shellcheck disable=SC2034
export XDG_RUNTIME_DIR="${XDG_RUNTIME_DIR:-$HOME/.local/run}"
# shellcheck disable=SC2034

@ -10,14 +10,6 @@
# shellcheck source=scripts/core/sxmo_common.sh
. "$(dirname "$0")/sxmo_common.sh"
if [ -f /etc/os-release ]; then
# freedesktop.org and systemd
. /etc/os-release
OS=$NAME
else
OS="Unknown"
fi
daemon_start() {
case "$OS" in
"Alpine Linux"|postmarketOS)

Loading…
Cancel
Save