mirror of
https://github.com/kairos-io/packages.git
synced 2025-08-19 16:38:06 +00:00
Remove dependency on bash (#839)
* Remove dependency on bash Bash is not always the default shell, and `source` only works in Bash. With Ubuntu 23 and 24 for example, the default shell is now Dash. Using `.` ensures wide compatibility. * Apply suggestions from code review * Apply suggestions from code review --------- Co-authored-by: Ettore Di Giacinto <mudler@users.noreply.github.com>
This commit is contained in:
parent
718aaa27e4
commit
2b6a96b28f
@ -37,7 +37,7 @@ set -e
|
||||
SCRIPT_DIR="$(dirname $(readlink -f "${0}"))"
|
||||
SCRIPT_NAME="$(basename "${0}")"
|
||||
|
||||
source "${SCRIPT_DIR}/nvcommon_build.sh"
|
||||
. "${SCRIPT_DIR}/nvcommon_build.sh"
|
||||
|
||||
function usage {
|
||||
cat <<EOM
|
||||
|
@ -96,8 +96,8 @@ stages:
|
||||
name: "add custom bind and ephemeral mounts to /run/cos/cos-layout.env"
|
||||
commands:
|
||||
- |
|
||||
source /run/cos/cos-layout.env
|
||||
source /run/cos/custom-layout.env
|
||||
. /run/cos/cos-layout.env
|
||||
. /run/cos/custom-layout.env
|
||||
PERSISTENT_STATE_PATHS="${PERSISTENT_STATE_PATHS} ${CUSTOM_BIND_MOUNTS} "
|
||||
RW_PATHS="${RW_PATHS} ${CUSTOM_EPHEMERAL_MOUNTS}"
|
||||
# Remove the existing lines that we are gonna rewrite
|
||||
|
@ -54,7 +54,7 @@ stages:
|
||||
pidfile="/run/cos-setup-reconcile.pid"
|
||||
respawn_delay=360
|
||||
set -o allexport
|
||||
if [ -f /etc/environment ]; then source /etc/environment; fi
|
||||
if [ -f /etc/environment ]; then . /etc/environment; fi
|
||||
set +o allexport
|
||||
- path: /etc/init.d/kairos-agent
|
||||
content: |
|
||||
@ -94,7 +94,7 @@ stages:
|
||||
pidfile="/run/${RC_SVCNAME}.pid"
|
||||
respawn_delay=5
|
||||
set -o allexport
|
||||
if [ -f /etc/environment ]; then source /etc/environment; fi
|
||||
if [ -f /etc/environment ]; then . /etc/environment; fi
|
||||
set +o allexport
|
||||
permissions: 0755
|
||||
owner: 0
|
||||
|
@ -21,7 +21,7 @@ stages:
|
||||
hostname: "cos-recovery"
|
||||
commands:
|
||||
- |
|
||||
source /etc/os-release
|
||||
. /etc/os-release
|
||||
echo >> /etc/issue
|
||||
echo "You are booting from recovery mode. Run 'kairos-agent reset' to reset the system to $VERSION" >> /etc/issue
|
||||
echo " or 'kairos-agent upgrade' to upgrade the active partition" >> /etc/issue
|
||||
|
Loading…
Reference in New Issue
Block a user