mirror of
https://github.com/aljazceru/kata-containers.git
synced 2026-01-03 06:24:21 +01:00
Merge pull request #3257 from liubin/fix/3256-show-usage-if-no-arguments-specified
osbuilder: show usage if no options/arguments specified
This commit is contained in:
@@ -474,6 +474,7 @@ set_dax_header() {
|
||||
|
||||
main() {
|
||||
[ "$(id -u)" -eq 0 ] || die "$0: must be run as root"
|
||||
[ "$#" -eq 0 ] && usage && return 0
|
||||
|
||||
# variables that can be overwritten by environment variables
|
||||
local agent_bin="${AGENT_BIN:-kata-agent}"
|
||||
|
||||
@@ -441,7 +441,7 @@ build_rootfs_distro()
|
||||
fi
|
||||
}
|
||||
|
||||
# Used to create a minimal directory tree where the agent can be instaleld.
|
||||
# Used to create a minimal directory tree where the agent can be installed.
|
||||
# This is used when a distro is not specified.
|
||||
prepare_overlay()
|
||||
{
|
||||
@@ -624,6 +624,8 @@ EOT
|
||||
|
||||
parse_arguments()
|
||||
{
|
||||
[ "$#" -eq 0 ] && usage && return 0
|
||||
|
||||
while getopts a:hlo:r:t: opt
|
||||
do
|
||||
case $opt in
|
||||
|
||||
Reference in New Issue
Block a user