Skip to content
This repository was archived by the owner on Dec 1, 2024. It is now read-only.

Commit 8e3cd77

Browse files
Merge pull request #285 from masayag/detect-version
Detect version from os-release
2 parents 56458b8 + 66acbee commit 8e3cd77

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

hack/install-agent-dnf.sh.template

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,17 @@ OPTIONS:
1717
to make the Flotta API accessible from your machine
1818
-p Port to connect to Flotta API, default 8043
1919
-t Indicates if to use testing repository, default is false
20-
-v Specifies the Fedora version to install, default is 35
2120
EOF
2221
}
2322

2423
FLOTTA_PORT=8043
2524

26-
while getopts "i:p:t:v:h" option; do
25+
while getopts "i:p:t:h" option; do
2726
case "${option}"
2827
in
2928
i) FLOTTA_API_IP=${OPTARG};;
3029
p) FLOTTA_PORT=${OPTARG};;
3130
t) TESTING_REPO=0;;
32-
v) VERSION=${OPTARG};;
3331
h)
3432
usage
3533
exit 0
@@ -47,6 +45,7 @@ if [[ -z $FLOTTA_API_IP ]]; then
4745
exit 1
4846
fi
4947

48+
VERSION=$(grep ^VERSION_ID /etc/os-release | cut -d= -f2)
5049
if [[ -z $VERSION ]]; then
5150
VERSION=35
5251
fi

0 commit comments

Comments
 (0)