docs: expand netupgrade usage and configuration docs
Update the README with installation, requirements, supported actions, config format, and usage details. Align the CLI help text with current behavior and add startup checks for required runtime dependencies.
This commit is contained in:
+14
-5
@@ -1,12 +1,20 @@
|
||||
#!/bin/bash
|
||||
|
||||
showHelp() {
|
||||
echo "netupgrade [-f] [-y] [configfilename]"
|
||||
echo "netupgrade [--help] [-f] [-y] [configfilename]"
|
||||
echo ""
|
||||
echo " -f : Select all nodes"
|
||||
echo " -y : No confirmation"
|
||||
echo " -b : Breack on error"
|
||||
echo " configfilename : a cfg filename"
|
||||
echo " --help Show this help message"
|
||||
echo " -f Select all nodes"
|
||||
echo " -y No confirmation for supported package managers"
|
||||
echo " configfilename Path to a cfg file"
|
||||
}
|
||||
|
||||
checkDependencies() {
|
||||
command -v ssh >/dev/null 2>&1 || { echo "Error: ssh is required"; exit 1; }
|
||||
command -v whiptail >/dev/null 2>&1 || { echo "Error: whiptail is required"; exit 1; }
|
||||
command -v nano >/dev/null 2>&1 || { echo "Error: nano is required"; exit 1; }
|
||||
command -v sed >/dev/null 2>&1 || { echo "Error: sed is required"; exit 1; }
|
||||
command -v tee >/dev/null 2>&1 || { echo "Error: tee is required"; exit 1; }
|
||||
}
|
||||
|
||||
pressAnyKey(){
|
||||
@@ -238,6 +246,7 @@ while [[ ${#} -gt 0 ]]; do
|
||||
esac
|
||||
done
|
||||
|
||||
checkDependencies
|
||||
loadConfig
|
||||
selectNodes
|
||||
|
||||
|
||||
Reference in New Issue
Block a user