Created
February 2, 2016 08:56
-
-
Save lennartvdd/e4bd27cd1291b16751c1 to your computer and use it in GitHub Desktop.
Linux iSCSI: Change startup type from manual to automatic on all nodes, AND the default config
This file contains 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
#!/bin/bash | |
set -e | |
if [[ $EUID -ne 0 ]]; then | |
echo "You must be a root user to run this script." 2>&1 | |
exit 1 | |
fi | |
find /etc/iscsi/ -type f | xargs grep -l "startup\s*=\s*manual" | xargs sed -i 's/\(startup\s*=\s*\)manual/\1automatic/' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment