1
0
mirror of https://github.com/rancher/os.git synced 2025-09-04 00:04:25 +00:00
Files
os/framework/files/usr/sbin/suc-upgrade

19 lines
437 B
Plaintext
Raw Normal View History

2021-08-31 11:14:03 -07:00
#!/bin/bash
set -x -e
HOST_DIR="${HOST_DIR:-/host}"
2021-10-20 10:58:54 -07:00
RELEASE_FILE="${RELEASE_FILE:-/usr/lib/rancheros-release}"
2021-08-31 11:14:03 -07:00
if [ "$FORCE" != "true" ]; then
if diff $RELEASE_FILE ${HOST_DIR}${RELEASE_FILE} >/dev/null; then
echo Update to date with
2021-10-20 10:58:54 -07:00
cat ${RELEASE_FILE}
2021-08-31 11:14:03 -07:00
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