1
0
mirror of https://github.com/rancher/os.git synced 2025-09-02 23:34:57 +00:00
Files
os/files/usr/sbin/suc-upgrade

16 lines
335 B
Plaintext
Raw Normal View History

2021-06-05 17:31:50 -07:00
#!/bin/bash
set -x -e
if [ "$FORCE" != "true" ]; then
if diff /etc/os-release /host/etc/os-release >/dev/null; then
echo Update to date with
cat /etc/os-release
exit 0
fi
fi
mount --rbind /host/dev /dev
mount --rbind /host/run /run
bash -x cos-upgrade --directory /
nsenter -i -m -t 1 -- reboot
exit 1