Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add suc upgrade support #360

Merged
merged 1 commit into from
Jul 2, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/installer/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ steps:
- cp -rfv upgrade.sh /usr/sbin/cos-upgrade && chmod +x /usr/sbin/cos-upgrade
- cp -rfv reset.sh /usr/sbin/cos-reset && chmod +x /usr/sbin/cos-reset
- cp -rfv deploy.sh /usr/sbin/cos-deploy && chmod +x /usr/sbin/cos-deploy
- cp -rfv suc-upgrade.sh /usr/sbin/suc-upgrade && chmod +x /usr/sbin/suc-upgrade
2 changes: 1 addition & 1 deletion packages/installer/definition.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
name: "installer"
category: "utils"
version: "0.7.9"
version: "0.8"
17 changes: 17 additions & 0 deletions packages/installer/suc-upgrade.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash
set -x -e
HOST_DIR="${HOST_DIR:-/host}"

if [ "$FORCE" != "true" ]; then
if diff /etc/os-release $HOST_DIR/etc/os-release >/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