mirror of
https://github.com/kairos-io/packages.git
synced 2025-09-04 00:45:41 +00:00
Use kairos-release instead of os-release (#1082)
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
packages:
|
packages:
|
||||||
- name: "kairos-overlay-files"
|
- name: "kairos-overlay-files"
|
||||||
category: "static"
|
category: "static"
|
||||||
version: "1.1.58"
|
version: "1.2.0"
|
||||||
|
@@ -1,5 +1,8 @@
|
|||||||
function setSelinux {
|
function setSelinux {
|
||||||
source (loop0)/etc/os-release
|
source (loop0)/etc/os-release
|
||||||
|
if [ -f (loop0)/etc/kairos-release ]; then
|
||||||
|
source (loop0)/etc/kairos-release
|
||||||
|
fi
|
||||||
|
|
||||||
# Disable selinux for all distros. Supporting selinux requires more than
|
# Disable selinux for all distros. Supporting selinux requires more than
|
||||||
# just enabling it like this.
|
# just enabling it like this.
|
||||||
@@ -16,7 +19,10 @@ function setSelinux {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setExtraConsole {
|
function setExtraConsole {
|
||||||
source (loop0)/etc/os-release
|
source (loop0)/etc/kairos-release
|
||||||
|
if [ -f (loop0)/etc/kairos-release ]; then
|
||||||
|
source (loop0)/etc/kairos-release
|
||||||
|
fi
|
||||||
set baseExtraConsole="console=ttyS0"
|
set baseExtraConsole="console=ttyS0"
|
||||||
# rpi
|
# rpi
|
||||||
if test $KAIROS_MODEL == "rpi3" -o test $KAIROS_MODEL == "rpi4"; then
|
if test $KAIROS_MODEL == "rpi3" -o test $KAIROS_MODEL == "rpi4"; then
|
||||||
@@ -29,7 +35,10 @@ function setExtraConsole {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function setExtraArgs {
|
function setExtraArgs {
|
||||||
source (loop0)/etc/os-release
|
source (loop0)/etc/kairos-release
|
||||||
|
if [ -f (loop0)/etc/kairos-release ]; then
|
||||||
|
source (loop0)/etc/kairos-release
|
||||||
|
fi
|
||||||
set baseExtraArgs=""
|
set baseExtraArgs=""
|
||||||
# rpi
|
# rpi
|
||||||
if test $KAIROS_MODEL == "rpi3" -o test $KAIROS_MODEL == "rpi4"; then
|
if test $KAIROS_MODEL == "rpi3" -o test $KAIROS_MODEL == "rpi4"; then
|
||||||
|
@@ -22,6 +22,7 @@ stages:
|
|||||||
commands:
|
commands:
|
||||||
- |
|
- |
|
||||||
. /etc/os-release
|
. /etc/os-release
|
||||||
|
[ -f "/etc/kairos-release" ] && . /etc/kairos-release
|
||||||
echo >> /etc/issue
|
echo >> /etc/issue
|
||||||
echo "You are booting from recovery mode. Run 'kairos-agent reset' to reset the system to $VERSION" >> /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
|
echo " or 'kairos-agent upgrade' to upgrade the active partition" >> /etc/issue
|
||||||
|
@@ -1,3 +1,3 @@
|
|||||||
name: "suc-upgrade"
|
name: "suc-upgrade"
|
||||||
category: "system"
|
category: "system"
|
||||||
version: "0.2.3"
|
version: "0.3.0"
|
||||||
|
@@ -3,10 +3,23 @@ set -x -e
|
|||||||
HOST_DIR="${HOST_DIR:-/host}"
|
HOST_DIR="${HOST_DIR:-/host}"
|
||||||
|
|
||||||
if [ "$FORCE" != "true" ]; then
|
if [ "$FORCE" != "true" ]; then
|
||||||
if diff /etc/os-release $HOST_DIR/etc/os-release >/dev/null; then
|
if [ -f "/etc/kairos-release" ]; then
|
||||||
echo Update to date with
|
UPDATE_VERSION=$(source /etc/kairos-release && echo "${KAIROS_VERSION}")
|
||||||
cat /etc/os-release
|
else
|
||||||
exit 0
|
UPDATE_VERSION=$(source /etc/os-release && echo "${KAIROS_VERSION}")
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -f "/etc/kairos-release" ]; then
|
||||||
|
CURRENT_VERSION=$(source "${HOST_DIR}"/etc/kairos-release && echo "${KAIROS_VERSION}")
|
||||||
|
else
|
||||||
|
CURRENT_VERSION=$(source "${HOST_DIR}"/etc/os-release && echo "${KAIROS_VERSION}")
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$CURRENT_VERSION" == "$UPDATE_VERSION" ]; then
|
||||||
|
echo Up to date
|
||||||
|
echo "Current version: ${CURRENT_VERSION}"
|
||||||
|
echo "Update version: ${UPDATE_VERSION}"
|
||||||
|
exit 0
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user