Page Menu
Home
DevCentral
Search
Configure Global Search
Log In
Files
F3778260
D2978.id7600.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
4 KB
Referenced Files
None
Subscribers
None
D2978.id7600.diff
View Options
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -32,3 +32,4 @@
rev: v0.1.0
hooks:
- id: shellcheck
+ args: ["--severity=warning"]
diff --git a/utils/bootstrap/hello-FreeBSD.sh b/utils/bootstrap/hello-FreeBSD.sh
new file mode 100755
--- /dev/null
+++ b/utils/bootstrap/hello-FreeBSD.sh
@@ -0,0 +1,67 @@
+#!/bin/sh
+
+# -------------------------------------------------------------
+# Bootstrap script — FreeBsD
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Project: Nasqueron
+# Description: Install Salt and try to connect to Complector
+# License: BSD-2-Clause
+# -------------------------------------------------------------
+
+if [ "$(id -u)" -ne 0 ]; then
+ echo "This command must be run as root." >&2
+ exit 1
+fi
+
+# -------------------------------------------------------------
+# Hello
+# ASCII art by Jason Balthis
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+printf "\n";
+printf "\033[1;34m----------------------------------------------------------------------- \033[m\n";
+printf "\033[31;1m , , \033[m\n";
+printf "\033[31;1m /( )\` \033[m\n";
+printf "\033[1;32m FFFFFFF \033[31;1m \ \___ / | \033[m\n";
+printf "\033[1;32m FF \033[31;1m /- _ \`-/ \' \033[m\n";
+printf "\033[1;32m FF \033[31;1m (/\/ \ \ /\ \033[m\n";
+printf "\033[1;32m FFFFF RR RRR EEEEE EEEEE \033[31;1m / / | \` \ \033[m\n";
+printf "\033[1;32m FF RRR EE EE EE EE \033[31;1m O O ) / | \033[m\n";
+printf "\033[1;32m FF RR EEEEEEE EEEEEEE \033[31;1m \`-^--\'\`< \' \033[m\n";
+printf "\033[1;32m FF RR EE EE \033[31;1m (_.) _ ) / \033[m\n";
+printf "\033[1;32m FF RR EEEEEE EEEEEE \033[31;1m \`.___/\` / \033[m\n";
+printf "\033[31;1m \`-----/ \033[m\n";
+printf "\033[1;32m BBBBBB SSSSS DDDDDD \033[31;1m <----. __ / __ \ \033[m\n";
+printf "\033[1;32m BB BB SS SS DD DD \033[31;1m <----|====O)))==) \) /==== \033[m\n";
+printf "\033[1;32m BB BB SS DD DD \033[31;1m <----\' \`--\' \`.__,\' \ \033[m\n";
+printf "\033[1;32m BBBBBB SSSSS DD DD \033[31;1m | | \033[m\n";
+printf "\033[1;32m BB BB SS DD DD \033[31;1m \ / \033[m\n";
+printf "\033[1;32m BB BB SS SS DD DD \033[31;1m ______( (_ / \______ \033[m\n";
+printf "\033[1;32m BBBBBB SSSSS DDDDDD \033[31;1m ,\' ,-----\' | \ \033[m\n";
+printf "\033[31;1m \`--{__________) \/ \033[m\n\n";
+printf "\033[1;34m--------------------------------------------------------------------- \033[m\n";
+printf "\033[1;32m Welcome to your new Nasqueron server, powered by \033[31;1mFreeBSD \033[m\n";
+printf "\033[33;1m Connecting the server to \033[31;1mComplector\033[m \033[33;1mto join the forest.\033[m\n";
+printf "\033[1;34m--------------------------------------------------------------------- \033[m\n";
+echo ""
+
+# -------------------------------------------------------------
+# Software installation
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+pkg update && pkg upgrade
+pkg install git tmux nano tmux py39-salt
+
+# -------------------------------------------------------------
+# Minimal salt configuration for this node
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+hostname -s > /usr/local/etc/salt/minion_id
+
+echo "172.27.27.7 complector complector.nasqueron.drake" >> /etc/hosts
+
+echo "master: complector.nasqueron.drake" > /usr/local/etc/salt/minion
+echo "master_finger: 'ec:b8:cf:8d:be:7a:eb:3c:43:8d:3b:38:3f:0e:bb:47:f6:eb:a3:89:92:3d:b4:b1:8f:19:48:1f:d2:8f:c9:60'" >> /usr/local/etc/salt/minion
+
+ifconfig | grep -q "inet 172.27.27." || echo "You need to configure an IP in 172.27.27.0/24" >&2
+ifconfig | grep -q "inet 172.27.27." && /usr/local/etc/rc.d/salt_minion onestart || (salt --versions && echo "Failure log available at /var/log/salt/minion")
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Tue, Nov 26, 04:27 (20 h, 55 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
2263942
Default Alt Text
D2978.id7600.diff (4 KB)
Attached To
Mode
D2978: Bootstrap FreeBSD server with Salt
Attached
Detach File
Event Timeline
Log In to Comment