Skip to content

Instantly share code, notes, and snippets.

@heiwa4126
Created May 12, 2021 08:36
Show Gist options
  • Save heiwa4126/5c6470b68bd39509b8c60d97515f8c5e to your computer and use it in GitHub Desktop.
Save heiwa4126/5c6470b68bd39509b8c60d97515f8c5e to your computer and use it in GitHub Desktop.
RHEL7で、手動アップデートの際に使ってるスクリプト。~/bin/update.shに置いてる。
#!/usr/bin/bash -e
# for RHEL7
sudo -i sh -c "\
yum update --downloadonly -y\
"
echo "Continue? (Enter or Ctrl+C)" ; read Wait
sudo -i sh -c "\
yum update -y ;\
package-cleanup --oldkernels -y ;\
"
needs-restarting -r
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment