File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -750,19 +750,16 @@ function get_random_port {
750750 echo $port
751751}
752752
753-
753+ # Save some state information
754+ #
755+ # Write out various useful state information to /etc/devstack-version
754756function write_devstack_version {
755- pushd $TOP_DIR
756- local git_version=" "
757- git_version=$( git log --format=" %H %ci" -1)
758757 cat - > /tmp/devstack-version << EOF
759- #!/bin/bash
760-
761- echo "DevStack Version: ${DEVSTACK_SERIES} - ${git_version} "
762- echo "OS Version: ${os_VENDOR} ${os_RELEASE} ${os_CODENAME} "
763-
758+ DevStack Version: ${DEVSTACK_SERIES}
759+ Change: $( git log --format=" %H %s %ci" -1)
760+ OS Version: ${os_VENDOR} ${os_RELEASE} ${os_CODENAME}
764761EOF
765- sudo install -m 755 /tmp/devstack-version /usr/local/bin /devstack-version
762+ sudo install -m 644 /tmp/devstack-version /etc /devstack-version
766763 rm /tmp/devstack-version
767764}
768765
Original file line number Diff line number Diff line change @@ -216,7 +216,7 @@ if [[ ! -r $TOP_DIR/stackrc ]]; then
216216fi
217217source $TOP_DIR /stackrc
218218
219- # this installs a devstack-version script to make it easy to report the version back
219+ # write /etc/ devstack-version
220220write_devstack_version
221221
222222# Warn users who aren't on an explicitly supported distro, but allow them to
@@ -1538,8 +1538,8 @@ if [[ "$USE_SYSTEMD" == "True" ]]; then
15381538 echo
15391539fi
15401540
1541- # devstack version
1542- devstack-version
1541+ # Useful info on current state
1542+ cat /etc/ devstack-version
15431543echo
15441544
15451545# Indicate how long this took to run (bash maintained variable ``SECONDS``)
You can’t perform that action at this time.
0 commit comments