From 870d9c32b00a65f361e2aaa26cfcc74f54a7b09a Mon Sep 17 00:00:00 2001 From: Alexey Vazhnov Date: Tue, 3 Jan 2023 19:00:22 +0000 Subject: [PATCH] Fix OpenRC init script error 'openrc-run.sh: source: not found' (#6614) To avoid error message: user@server ~ % /etc/init.d/k3s status /lib/rc/sh/openrc-run.sh: 28: /etc/init.d/k3s: source: not found /lib/rc/sh/openrc-run.sh: 29: /etc/init.d/k3s: source: not found * status: stopped I've replaced `source` with `sourcex`, defined in https://github.com/OpenRC/openrc/blob/master/sh/openrc-run.sh.in#L30 Classic shell `.` also works. Tested in Devuan 5 Daedalus (based on Debian 12 bookworm / testing), package `openrc` version 0.45.2-2. Signed-off-by: Alexey Vazhnov --- install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index 230769b989..64974d12ca 100755 --- a/install.sh +++ b/install.sh @@ -836,8 +836,8 @@ respawn_delay=5 respawn_max=0 set -o allexport -if [ -f /etc/environment ]; then source /etc/environment; fi -if [ -f ${FILE_K3S_ENV} ]; then source ${FILE_K3S_ENV}; fi +if [ -f /etc/environment ]; then sourcex /etc/environment; fi +if [ -f ${FILE_K3S_ENV} ]; then sourcex ${FILE_K3S_ENV}; fi set +o allexport EOF $SUDO chmod 0755 ${FILE_K3S_SERVICE}