Skip to content
This repository has been archived by the owner on Sep 2, 2021. It is now read-only.

Commit

Permalink
Merge pull request #174 from digitalrebar/kernel-param-first
Browse files Browse the repository at this point in the history
Modify join-up.sh to search RS_UUID in kernel params first.
  • Loading branch information
galthaus authored Dec 14, 2018
2 parents 35c66b5 + 56183f6 commit 0769214
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions content/bootenvs/discovery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -209,11 +209,20 @@ Templates:
set -x
# Code assumes provider has set HOSTNAME correctly!!
RS_UUID=$(drpcli machines list Name=$HOSTNAME | jq -r .[0].Uuid)
# Check just in case we pxe booted.
host_re='rs\.uuid=([^ ]+)'
if [[ $(cat /proc/cmdline) =~ $host_re ]]; then
RS_UUID="${BASH_REMATCH[1]}"
fi
# Check Hostname to find us
if [[ $RS_UUID == null || $RS_UUID == "" ]]; then
RS_UUID=$(drpcli machines show Name:$HOSTNAME | jq -r .Uuid)
RS_UUID=$(drpcli machines list Name=$HOSTNAME | jq -r .[0].Uuid)
if [[ $RS_UUID == null || $RS_UUID == "" ]]; then
RS_UUID=$(drpcli machines show Name:$HOSTNAME | jq -r .Uuid)
fi
fi
# If no uuid, check to see if we have one stored from before
if [[ $RS_UUID == null || $RS_UUID == "" ]]; then
# See if we have already been created based on dropping uuid file
Expand Down

0 comments on commit 0769214

Please sign in to comment.