Skip to content

Commit

Permalink
feat(packer): proper grendel postscript
Browse files Browse the repository at this point in the history
  • Loading branch information
Darkness4 committed Apr 20, 2023
1 parent 6822c2b commit 61d2a2a
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packer-recipes/rocky8.6/http/ks.bare.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,14 @@ cat << 'END' >/pull-postscript.sh
#!/bin/sh
set -ex

curl -fsSL http://grendel.internal/repo/postscript.sh -o /postscript.sh
HOSTNAME="$(sed -E 's/^.*grendel.hostname=([^ ]*).*$/\1/' /proc/cmdline)"
hostnamectl set-hostname "${HOSTNAME}"

GRENDEL_ADDRESS="$(sed -E 's/^.*grendel.address=([^ ]*).*$/\1/' /proc/cmdline)"

curl -fsSL ${GRENDEL_ADDRESS}/repo/postscript.sh -o /postscript.sh
chmod +x /postscript.sh
/postscript.sh $(hostname)
/postscript.sh ${HOSTNAME}
END

chmod +x /pull-postscript.sh
Expand Down

0 comments on commit 61d2a2a

Please sign in to comment.