summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2020-09-23 13:19:09 +0200
committerSimon Rettberg2020-09-23 13:19:09 +0200
commit368579ee5498b5051cc32fe42df2caff2573fc74 (patch)
treee67066b506e56fbfa6db634caa85fe72657ff5c0
parent[idleaction] Disable screensaver in remoteaccess mode (diff)
downloadmltk-368579ee5498b5051cc32fe42df2caff2573fc74.tar.gz
mltk-368579ee5498b5051cc32fe42df2caff2573fc74.tar.xz
mltk-368579ee5498b5051cc32fe42df2caff2573fc74.zip
[*] Remove "export PATH..." -> DefaultEnvironment= in system.conf.d
Since we can set PATH for everything spawned by systemd, this boilerplate code is not needed anymore. Makes future changes much easier.
-rwxr-xr-xcore/modules/dhcpc-busybox/data/opt/openslx/scripts/udhcpc-openslx2
-rwxr-xr-xcore/modules/dnbd3-proxy-mode/data/opt/openslx/scripts/systemd-dnbd3_proxy2
-rwxr-xr-xcore/modules/hardware-stats/data/opt/openslx/scripts/systemd-hardware_stats2
-rwxr-xr-xcore/modules/hardware-stats/data/opt/openslx/system-check/hooks.d/50-hardware-report2
-rwxr-xr-xcore/modules/idleaction/data/opt/openslx/scripts/idleaction-scheduled_action3
-rwxr-xr-xcore/modules/iptables-helper/data/opt/openslx/iptables/iptables-reloader-worker2
-rw-r--r--core/modules/kiosk-slxbrowser/data/opt/openslx/scripts/kiosk-launch.d/00-slxbrowser2
-rwxr-xr-xcore/modules/run-virt/data/opt/openslx/scripts/systemd-mount_vm_store2
-rwxr-xr-xcore/modules/run-virt/data/opt/openslx/scripts/systemd-run_virt_env2
-rwxr-xr-xcore/modules/slx-issue/data/opt/openslx/scripts/openslx-create_issue2
-rwxr-xr-xcore/modules/smartctl/data/opt/openslx/scripts/systemd-smartctl2
-rwxr-xr-xcore/modules/vbox-src/data/opt/openslx/scripts/systemd-vbox_env2
-rwxr-xr-xcore/modules/vmware-common/data/opt/openslx/scripts/systemd-vmware_env2
-rwxr-xr-xcore/modules/vmware-version-check/data/opt/openslx/bin/vmware-get-supported-version2
-rwxr-xr-xcore/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-download_slx_addons2
15 files changed, 2 insertions, 29 deletions
diff --git a/core/modules/dhcpc-busybox/data/opt/openslx/scripts/udhcpc-openslx b/core/modules/dhcpc-busybox/data/opt/openslx/scripts/udhcpc-openslx
index 8130eb13..cf4576a7 100755
--- a/core/modules/dhcpc-busybox/data/opt/openslx/scripts/udhcpc-openslx
+++ b/core/modules/dhcpc-busybox/data/opt/openslx/scripts/udhcpc-openslx
@@ -18,8 +18,6 @@
#
# -----------------------------------------------------------------------------
-export PATH=$PATH:/opt/openslx/sbin:/opt/openslx/bin
-
. /opt/openslx/config
primary="br0"
diff --git a/core/modules/dnbd3-proxy-mode/data/opt/openslx/scripts/systemd-dnbd3_proxy b/core/modules/dnbd3-proxy-mode/data/opt/openslx/scripts/systemd-dnbd3_proxy
index 9b645796..e094aa44 100755
--- a/core/modules/dnbd3-proxy-mode/data/opt/openslx/scripts/systemd-dnbd3_proxy
+++ b/core/modules/dnbd3-proxy-mode/data/opt/openslx/scripts/systemd-dnbd3_proxy
@@ -1,7 +1,5 @@
#!/bin/ash
-export PATH="$PATH:/opt/openslx/sbin:/opt/openslx/bin"
-
ERRLOG="/run/dnbd3-proxy.err"
if [ -s "$ERRLOG" ]; then
diff --git a/core/modules/hardware-stats/data/opt/openslx/scripts/systemd-hardware_stats b/core/modules/hardware-stats/data/opt/openslx/scripts/systemd-hardware_stats
index d059657e..dd334cc7 100755
--- a/core/modules/hardware-stats/data/opt/openslx/scripts/systemd-hardware_stats
+++ b/core/modules/hardware-stats/data/opt/openslx/scripts/systemd-hardware_stats
@@ -8,8 +8,6 @@
export LANG=C
export LC_ALL=C
-export PATH=$PATH:/opt/openslx/sbin:/opt/openslx/bin
-
touch "/tmp/hw-delete-list" || exit 10
chmod 0600 "/tmp/hw-delete-list" || exit 11
echo -n "" > "/tmp/hw-delete-list" || exit 12
diff --git a/core/modules/hardware-stats/data/opt/openslx/system-check/hooks.d/50-hardware-report b/core/modules/hardware-stats/data/opt/openslx/system-check/hooks.d/50-hardware-report
index 6d137f40..a2dbbd56 100755
--- a/core/modules/hardware-stats/data/opt/openslx/system-check/hooks.d/50-hardware-report
+++ b/core/modules/hardware-stats/data/opt/openslx/system-check/hooks.d/50-hardware-report
@@ -1,7 +1,5 @@
#!/bin/ash
-export PATH=$PATH:/opt/openslx/sbin:/opt/openslx/bin
-
. /opt/openslx/config
disable_remote_logging() {
diff --git a/core/modules/idleaction/data/opt/openslx/scripts/idleaction-scheduled_action b/core/modules/idleaction/data/opt/openslx/scripts/idleaction-scheduled_action
index 38be4f79..c30ac7fb 100755
--- a/core/modules/idleaction/data/opt/openslx/scripts/idleaction-scheduled_action
+++ b/core/modules/idleaction/data/opt/openslx/scripts/idleaction-scheduled_action
@@ -1,6 +1,7 @@
#!/bin/ash
-export PATH="$PATH:/opt/openslx/bin:/opt/openslx/sbin"
+# Called via mgmt SSH so PATH might be wrong!
+export PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/openslx/sbin:/opt/openslx/bin"
if ! touch "/run"; then
echo "Only root can call this" >&2
diff --git a/core/modules/iptables-helper/data/opt/openslx/iptables/iptables-reloader-worker b/core/modules/iptables-helper/data/opt/openslx/iptables/iptables-reloader-worker
index 4bcf41f4..0c8277a2 100755
--- a/core/modules/iptables-helper/data/opt/openslx/iptables/iptables-reloader-worker
+++ b/core/modules/iptables-helper/data/opt/openslx/iptables/iptables-reloader-worker
@@ -6,8 +6,6 @@
#
# This scriptis triggered by inotifyd, see openslx-iptables_reloader.service
-export PATH="$PATH:/opt/openslx/sbin:/opt/openslx/bin"
-
ALL_RULES="/run/iptables-reloader.cache"
LOCK="/run/iptables-reloader.lock"
WAIT="/run/iptables-reloader.wait"
diff --git a/core/modules/kiosk-slxbrowser/data/opt/openslx/scripts/kiosk-launch.d/00-slxbrowser b/core/modules/kiosk-slxbrowser/data/opt/openslx/scripts/kiosk-launch.d/00-slxbrowser
index fc8d0eae..94c69247 100644
--- a/core/modules/kiosk-slxbrowser/data/opt/openslx/scripts/kiosk-launch.d/00-slxbrowser
+++ b/core/modules/kiosk-slxbrowser/data/opt/openslx/scripts/kiosk-launch.d/00-slxbrowser
@@ -1,8 +1,6 @@
#!/bin/bash
# ^ sourced!
-export PATH=$PATH:/opt/openslx/sbin:/opt/openslx/bin
-
command -v slxbrowser || return 0
OPTS=()
diff --git a/core/modules/run-virt/data/opt/openslx/scripts/systemd-mount_vm_store b/core/modules/run-virt/data/opt/openslx/scripts/systemd-mount_vm_store
index a9ce62b6..335c0f51 100755
--- a/core/modules/run-virt/data/opt/openslx/scripts/systemd-mount_vm_store
+++ b/core/modules/run-virt/data/opt/openslx/scripts/systemd-mount_vm_store
@@ -2,8 +2,6 @@
. /opt/openslx/config || exit 1
-export PATH="$PATH:/opt/openslx/sbin:/opt/openslx/bin"
-
[ -z "$SLX_VM_NFS" ] && exit 0
# create target directory
diff --git a/core/modules/run-virt/data/opt/openslx/scripts/systemd-run_virt_env b/core/modules/run-virt/data/opt/openslx/scripts/systemd-run_virt_env
index efc85ad3..ddcb81c5 100755
--- a/core/modules/run-virt/data/opt/openslx/scripts/systemd-run_virt_env
+++ b/core/modules/run-virt/data/opt/openslx/scripts/systemd-run_virt_env
@@ -23,8 +23,6 @@
### Define default dirs / get configs
################################################################################
-export PATH=$PATH:/opt/openslx/bin:/opt/openslx/sbin
-
# source config file with vars (e.g. ipaddr, macaddr, HOSTNAME)
. /opt/openslx/config
diff --git a/core/modules/slx-issue/data/opt/openslx/scripts/openslx-create_issue b/core/modules/slx-issue/data/opt/openslx/scripts/openslx-create_issue
index befe268b..922830d2 100755
--- a/core/modules/slx-issue/data/opt/openslx/scripts/openslx-create_issue
+++ b/core/modules/slx-issue/data/opt/openslx/scripts/openslx-create_issue
@@ -17,8 +17,6 @@
# First script for initial ramfs for OpenSLX linux stateless clients
#############################################################################
-export PATH="$PATH:/opt/openslx/bin:/opt/openslx/sbin"
-
# Set greeting and add information about the booted system
mkdir -p /run/openslx
diff --git a/core/modules/smartctl/data/opt/openslx/scripts/systemd-smartctl b/core/modules/smartctl/data/opt/openslx/scripts/systemd-smartctl
index 2ad5aa13..979fde62 100755
--- a/core/modules/smartctl/data/opt/openslx/scripts/systemd-smartctl
+++ b/core/modules/smartctl/data/opt/openslx/scripts/systemd-smartctl
@@ -1,7 +1,5 @@
#!/bin/ash
-export PATH="$PATH:/opt/openslx/sbin:/opt/openslx/bin"
-
# Check Reallocated_Sector_Ct and Spin_Retry_Count of local disk(s)
. /opt/openslx/config
diff --git a/core/modules/vbox-src/data/opt/openslx/scripts/systemd-vbox_env b/core/modules/vbox-src/data/opt/openslx/scripts/systemd-vbox_env
index 49d5b6c7..8f99ceb6 100755
--- a/core/modules/vbox-src/data/opt/openslx/scripts/systemd-vbox_env
+++ b/core/modules/vbox-src/data/opt/openslx/scripts/systemd-vbox_env
@@ -16,8 +16,6 @@
# - This is the preparation script for the configuration of VirtualBox.
################################################################################
-export PATH="$PATH":/opt/openslx/bin:/opt/openslx/sbin
-
## sanity checks
VBOX_BASE_DIR="/usr/lib/virtualbox"
VBOX_KMOD_DIR="/lib/modules/vbox"
diff --git a/core/modules/vmware-common/data/opt/openslx/scripts/systemd-vmware_env b/core/modules/vmware-common/data/opt/openslx/scripts/systemd-vmware_env
index 76d8696b..f5ca0b99 100755
--- a/core/modules/vmware-common/data/opt/openslx/scripts/systemd-vmware_env
+++ b/core/modules/vmware-common/data/opt/openslx/scripts/systemd-vmware_env
@@ -17,8 +17,6 @@
# VMware modules and services
################################################################################
-export PATH="$PATH:/opt/openslx/sbin:/opt/openslx/bin"
-
VMWARE_CONF_DIR=/opt/openslx/vmchooser/vmware
VMCHOOSER_CONF_DIR=/opt/openslx/vmchooser/config
diff --git a/core/modules/vmware-version-check/data/opt/openslx/bin/vmware-get-supported-version b/core/modules/vmware-version-check/data/opt/openslx/bin/vmware-get-supported-version
index 0165191d..24382bca 100755
--- a/core/modules/vmware-version-check/data/opt/openslx/bin/vmware-get-supported-version
+++ b/core/modules/vmware-version-check/data/opt/openslx/bin/vmware-get-supported-version
@@ -3,8 +3,6 @@
# * Intel: check for "VMX Unrestricted Guest" CPU flag
# * AMD: check if CPU family is Bulldozer or newer
-export PATH=$PATH:/opt/openslx/sbin:/opt/openslx/bin
-
VIRTTYPE=$(grep -m1 '^flags\s*:' /proc/cpuinfo | grep -wo -e svm -e vmx)
if [ -z "$VIRTTYPE" ]; then
diff --git a/core/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-download_slx_addons b/core/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-download_slx_addons
index 735c72c0..0fed8342 100755
--- a/core/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-download_slx_addons
+++ b/core/rootfs/rootfs-stage32/data/opt/openslx/scripts/systemd-download_slx_addons
@@ -14,8 +14,6 @@
#
######################################################################################
-export PATH=$PATH:/opt/openslx/sbin:/opt/openslx/bin
-
# read global OpenSLX config
. /opt/openslx/config || { echo "Could not source config!"; exit 23; }