summaryrefslogtreecommitdiff
path: root/gemfeed
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-01-03 23:58:49 +0200
committerPaul Buetow <paul@buetow.org>2026-01-03 23:58:49 +0200
commit29f30d9eabbf1144888bc93bbfe31f6ff6a3f96c (patch)
treeece5eb334ac2da3e333edbb0afe9db10f89152d4 /gemfeed
parent17b6ed7797175efa54fe7e271527709a462e5e6a (diff)
Update content for gemtext
Diffstat (limited to 'gemfeed')
-rw-r--r--gemfeed/2025-07-14-f3s-kubernetes-with-freebsd-part-6.gmi12
-rw-r--r--gemfeed/2025-07-14-f3s-kubernetes-with-freebsd-part-6.gmi.tpl12
-rw-r--r--gemfeed/atom.xml14
3 files changed, 25 insertions, 13 deletions
diff --git a/gemfeed/2025-07-14-f3s-kubernetes-with-freebsd-part-6.gmi b/gemfeed/2025-07-14-f3s-kubernetes-with-freebsd-part-6.gmi
index 2c63f3b4..b6886095 100644
--- a/gemfeed/2025-07-14-f3s-kubernetes-with-freebsd-part-6.gmi
+++ b/gemfeed/2025-07-14-f3s-kubernetes-with-freebsd-part-6.gmi
@@ -898,12 +898,14 @@ paul@f0:~ % doas service devd restart
Next, we create the CARP control script that will restart stunnel when the CARP state changes:
+> Update: Fixed the script at Sat 3 Jan 23:55:11 EET 2026 - changed `$1` to `$2` because devd passes `$subsystem $type`, so the state is in the second argument.
+
```sh
paul@f0:~ % doas tee /usr/local/bin/carpcontrol.sh <<'EOF'
#!/bin/sh
# CARP state change control script
-case "$1" in
+case "$2" in
MASTER)
logger "CARP state changed to MASTER, starting services"
;;
@@ -911,7 +913,7 @@ case "$1" in
logger "CARP state changed to BACKUP, stopping services"
;;
*)
- logger "CARP state changed to $1 (unhandled)"
+ logger "CARP state changed to $2 (unhandled)"
;;
esac
EOF
@@ -1189,6 +1191,8 @@ This ensures that clients always connect to the active NFS server through the CA
This approach ensures clients can only connect to the active server, eliminating stale handles from the inactive server:
+> Update: Fixed the script at Sat 3 Jan 23:55:11 EET 2026 - changed `$1` to `$2` because devd passes `$subsystem $type`, so the state is in the second argument.
+
```sh
# Create CARP control script on both f0 and f1
paul@f0:~ % doas tee /usr/local/bin/carpcontrol.sh <<'EOF'
@@ -1213,7 +1217,7 @@ if [ ! -f /data/nfs/nfs.DO_NOT_REMOVE ]; then
fi
-case "$1" in
+case "$2" in
MASTER)
logger "CARP state changed to MASTER, starting services"
service rpcbind start >/dev/null 2>&1
@@ -1232,7 +1236,7 @@ case "$1" in
logger "CARP BACKUP: NFS and stunnel services stopped"
;;
*)
- logger "CARP state changed to $1 (unhandled)"
+ logger "CARP state changed to $2 (unhandled)"
;;
esac
EOF
diff --git a/gemfeed/2025-07-14-f3s-kubernetes-with-freebsd-part-6.gmi.tpl b/gemfeed/2025-07-14-f3s-kubernetes-with-freebsd-part-6.gmi.tpl
index cc5ea379..1bf1fde7 100644
--- a/gemfeed/2025-07-14-f3s-kubernetes-with-freebsd-part-6.gmi.tpl
+++ b/gemfeed/2025-07-14-f3s-kubernetes-with-freebsd-part-6.gmi.tpl
@@ -841,12 +841,14 @@ paul@f0:~ % doas service devd restart
Next, we create the CARP control script that will restart stunnel when the CARP state changes:
+> Update: Fixed the script at Sat 3 Jan 23:55:11 EET 2026 - changed `$1` to `$2` because devd passes `$subsystem $type`, so the state is in the second argument.
+
```sh
paul@f0:~ % doas tee /usr/local/bin/carpcontrol.sh <<'EOF'
#!/bin/sh
# CARP state change control script
-case "$1" in
+case "$2" in
MASTER)
logger "CARP state changed to MASTER, starting services"
;;
@@ -854,7 +856,7 @@ case "$1" in
logger "CARP state changed to BACKUP, stopping services"
;;
*)
- logger "CARP state changed to $1 (unhandled)"
+ logger "CARP state changed to $2 (unhandled)"
;;
esac
EOF
@@ -1132,6 +1134,8 @@ This ensures that clients always connect to the active NFS server through the CA
This approach ensures clients can only connect to the active server, eliminating stale handles from the inactive server:
+> Update: Fixed the script at Sat 3 Jan 23:55:11 EET 2026 - changed `$1` to `$2` because devd passes `$subsystem $type`, so the state is in the second argument.
+
```sh
# Create CARP control script on both f0 and f1
paul@f0:~ % doas tee /usr/local/bin/carpcontrol.sh <<'EOF'
@@ -1156,7 +1160,7 @@ if [ ! -f /data/nfs/nfs.DO_NOT_REMOVE ]; then
fi
-case "$1" in
+case "$2" in
MASTER)
logger "CARP state changed to MASTER, starting services"
service rpcbind start >/dev/null 2>&1
@@ -1175,7 +1179,7 @@ case "$1" in
logger "CARP BACKUP: NFS and stunnel services stopped"
;;
*)
- logger "CARP state changed to $1 (unhandled)"
+ logger "CARP state changed to $2 (unhandled)"
;;
esac
EOF
diff --git a/gemfeed/atom.xml b/gemfeed/atom.xml
index f2bacd29..035bfbc6 100644
--- a/gemfeed/atom.xml
+++ b/gemfeed/atom.xml
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
- <updated>2026-01-01T12:26:21+02:00</updated>
+ <updated>2026-01-03T23:57:42+02:00</updated>
<title>foo.zone feed</title>
<subtitle>To be in the .zone!</subtitle>
<link href="gemini://foo.zone/gemfeed/atom.xml" rel="self" />
@@ -7428,6 +7428,8 @@ paul@f0:~ % doas service devd restart
<br />
<span>Next, we create the CARP control script that will restart stunnel when the CARP state changes:</span><br />
<br />
+<span class='quote'>Update: Fixed the script at Sat 3 Jan 23:55:11 EET 2026 - changed <span class='inlinecode'>$1</span> to <span class='inlinecode'>$2</span> because devd passes <span class='inlinecode'>$subsystem $type</span>, so the state is in the second argument.</span><br />
+<br />
<!-- Generator: GNU source-highlight 3.1.9
by Lorenzo Bettini
http://www.lorenzobettini.it
@@ -7436,7 +7438,7 @@ http://www.gnu.org/software/src-highlite -->
<i><font color="silver">#!/bin/sh</font></i>
<i><font color="silver"># CARP state change control script</font></i>
-<b><u><font color="#000000">case</font></u></b> <font color="#808080">"$1"</font> <b><u><font color="#000000">in</font></u></b>
+<b><u><font color="#000000">case</font></u></b> <font color="#808080">"$2"</font> <b><u><font color="#000000">in</font></u></b>
MASTER)
logger <font color="#808080">"CARP state changed to MASTER, starting services"</font>
;;
@@ -7444,7 +7446,7 @@ http://www.gnu.org/software/src-highlite -->
logger <font color="#808080">"CARP state changed to BACKUP, stopping services"</font>
;;
*)
- logger <font color="#808080">"CARP state changed to $1 (unhandled)"</font>
+ logger <font color="#808080">"CARP state changed to $2 (unhandled)"</font>
;;
<b><u><font color="#000000">esac</font></u></b>
EOF
@@ -7754,6 +7756,8 @@ Starting stunnel.
</ul><br />
<span>This approach ensures clients can only connect to the active server, eliminating stale handles from the inactive server:</span><br />
<br />
+<span class='quote'>Update: Fixed the script at Sat 3 Jan 23:55:11 EET 2026 - changed <span class='inlinecode'>$1</span> to <span class='inlinecode'>$2</span> because devd passes <span class='inlinecode'>$subsystem $type</span>, so the state is in the second argument.</span><br />
+<br />
<!-- Generator: GNU source-highlight 3.1.9
by Lorenzo Bettini
http://www.lorenzobettini.it
@@ -7781,7 +7785,7 @@ HOSTNAME=`hostname`
<b><u><font color="#000000">fi</font></u></b>
-<b><u><font color="#000000">case</font></u></b> <font color="#808080">"$1"</font> <b><u><font color="#000000">in</font></u></b>
+<b><u><font color="#000000">case</font></u></b> <font color="#808080">"$2"</font> <b><u><font color="#000000">in</font></u></b>
MASTER)
logger <font color="#808080">"CARP state changed to MASTER, starting services"</font>
service rpcbind start &gt;/dev/null <font color="#000000">2</font>&gt;&amp;<font color="#000000">1</font>
@@ -7800,7 +7804,7 @@ HOSTNAME=`hostname`
logger <font color="#808080">"CARP BACKUP: NFS and stunnel services stopped"</font>
;;
*)
- logger <font color="#808080">"CARP state changed to $1 (unhandled)"</font>
+ logger <font color="#808080">"CARP state changed to $2 (unhandled)"</font>
;;
<b><u><font color="#000000">esac</font></u></b>
EOF