Created
May 12, 2021 08:36
-
-
Save heiwa4126/5c6470b68bd39509b8c60d97515f8c5e to your computer and use it in GitHub Desktop.
RHEL7で、手動アップデートの際に使ってるスクリプト。~/bin/update.shに置いてる。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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