mirror of
https://github.com/rancher/os.git
synced 2025-09-01 06:40:31 +00:00
Refactor build
This commit is contained in:
0
framework/files/usr/libexec/.placeholder
Normal file
0
framework/files/usr/libexec/.placeholder
Normal file
5
framework/files/usr/sbin/self-upgrade
Executable file
5
framework/files/usr/sbin/self-upgrade
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
set -e -x
|
||||
source /usr/lib/rancheros-release
|
||||
cos-upgrade --no-verify --docker-image "${IMAGE}"
|
||||
reboot
|
18
framework/files/usr/sbin/suc-upgrade
Executable file
18
framework/files/usr/sbin/suc-upgrade
Executable 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
|
Reference in New Issue
Block a user