1
0
mirror of https://github.com/rancher/os.git synced 2025-09-01 06:40:31 +00:00

Refactor build

This commit is contained in:
Darren Shepherd
2021-08-31 11:14:03 -07:00
parent e38bab4144
commit 3040e886dc
56 changed files with 2098 additions and 292 deletions

View File

View File

@@ -0,0 +1,5 @@
#!/bin/bash
set -e -x
source /usr/lib/rancheros-release
cos-upgrade --no-verify --docker-image "${IMAGE}"
reboot

View File

@@ -0,0 +1,18 @@
#!/bin/bash
set -x -e
HOST_DIR="${HOST_DIR:-/host}"
RELEASE_FILE="${RELEASE_FILE:-/etc/os-release}"
if [ "$FORCE" != "true" ]; then
if diff $RELEASE_FILE ${HOST_DIR}${RELEASE_FILE} >/dev/null; then
echo Update to date with
cat /etc/os-release
exit 0
fi
fi
mount --rbind $HOST_DIR/dev /dev
mount --rbind $HOST_DIR/run /run
bash -x cos-upgrade --directory /
nsenter -i -m -t 1 -- reboot
exit 1