summaryrefslogtreecommitdiff
path: root/hosts/iroha/scripts
diff options
context:
space:
mode:
authorAndrew Opalach <andrew@akon.city> 2024-11-13 11:16:51 -0500
committerAndrew Opalach <andrew@akon.city> 2024-11-13 11:16:51 -0500
commit69657cffd889bc353cbf8e83f12b46bc48f7321b (patch)
tree654050797a489bfd4064a72d7c63a0ebd09e731d /hosts/iroha/scripts
parent66ef19bafce2013f8878942e199541c8c994403c (diff)
downloaddotfiles-69657cffd889bc353cbf8e83f12b46bc48f7321b.tar.gz
dotfiles-69657cffd889bc353cbf8e83f12b46bc48f7321b.tar.bz2
dotfiles-69657cffd889bc353cbf8e83f12b46bc48f7321b.zip
Update gentoo hosts
Diffstat (limited to 'hosts/iroha/scripts')
-rwxr-xr-xhosts/iroha/scripts/gen-dracut2
-rwxr-xr-xhosts/iroha/scripts/mount-nfs2
-rwxr-xr-xhosts/iroha/scripts/port-forward29
-rwxr-xr-xhosts/iroha/scripts/rebuild-modules4
4 files changed, 28 insertions, 9 deletions
diff --git a/hosts/iroha/scripts/gen-dracut b/hosts/iroha/scripts/gen-dracut
index 8d3a63f..da32002 100755
--- a/hosts/iroha/scripts/gen-dracut
+++ b/hosts/iroha/scripts/gen-dracut
@@ -1,2 +1,2 @@
#! /usr/bin/env sh
-dracut -a lvm --kver=6.11.0-gentoo --force
+dracut -a lvm --kver=6.12.0-rc7 --force
diff --git a/hosts/iroha/scripts/mount-nfs b/hosts/iroha/scripts/mount-nfs
index 8a2d70e..c794ee4 100755
--- a/hosts/iroha/scripts/mount-nfs
+++ b/hosts/iroha/scripts/mount-nfs
@@ -1,2 +1,2 @@
#! /usr/bin/env sh
-sudo mount -t nfs4 -o rw,bg,hard,rsize=32768,wsize=32768,tcp,timeo=600,nfsvers=4.1 moyo:$1 $2
+sudo mount -t nfs4 -o noatime,nodiratime,rw,bg,hard,intr,rsize=16384,wsize=16384,tcp,timeo=600,retrans=2,nfsvers=4.1 moyo:$1 $2
diff --git a/hosts/iroha/scripts/port-forward b/hosts/iroha/scripts/port-forward
index fa759d7..59eca03 100755
--- a/hosts/iroha/scripts/port-forward
+++ b/hosts/iroha/scripts/port-forward
@@ -1,12 +1,29 @@
#! /usr/bin/env sh
-su -c "iptables -t nat -C PREROUTING -p tcp -i enp7s0 --dport 47984 -j DNAT --to-destination 192.168.211.252:47984 || \
-iptables -t nat -A PREROUTING -p tcp -i enp7s0 --dport 47984 -j DNAT --to-destination 192.168.211.252:47984;
+if [ "$(id -u)" -ne 0 ]; then
+ echo 'This script must be run by root.' >&2
+ exit 1
+fi
+
+# Sunshine
+iptables -t nat -C PREROUTING -p tcp -i enp7s0 --dport 47984 -j DNAT --to-destination 192.168.211.252:47984 || \
+ iptables -t nat -A PREROUTING -p tcp -i enp7s0 --dport 47984 -j DNAT --to-destination 192.168.211.252:47984
+
iptables -t nat -C PREROUTING -p tcp -i enp7s0 --dport 47984 -j DNAT --to-destination 192.168.211.252:47984 || \
-iptables -t nat -A PREROUTING -p tcp -i enp7s0 --dport 47984 -j DNAT --to-destination 192.168.211.252:47984;
+ iptables -t nat -A PREROUTING -p tcp -i enp7s0 --dport 47984 -j DNAT --to-destination 192.168.211.252:47984
+
iptables -t nat -C PREROUTING -p tcp -i enp7s0 --dport 47989 -j DNAT --to-destination 192.168.211.252:47989 || \
-iptables -t nat -A PREROUTING -p tcp -i enp7s0 --dport 47989 -j DNAT --to-destination 192.168.211.252:47989;
+ iptables -t nat -A PREROUTING -p tcp -i enp7s0 --dport 47989 -j DNAT --to-destination 192.168.211.252:47989
+
iptables -t nat -C PREROUTING -p tcp -i enp7s0 --dport 48010 -j DNAT --to-destination 192.168.211.252:48010 || \
-iptables -t nat -A PREROUTING -p tcp -i enp7s0 --dport 48010 -j DNAT --to-destination 192.168.211.252:48010;
+ iptables -t nat -A PREROUTING -p tcp -i enp7s0 --dport 48010 -j DNAT --to-destination 192.168.211.252:48010
+
iptables -t nat -C PREROUTING -p udp -i enp7s0 --dport 47998:48000 -j DNAT --to-destination 192.168.211.252:47998-48000 || \
-iptables -t nat -A PREROUTING -p udp -i enp7s0 --dport 47998:48000 -j DNAT --to-destination 192.168.211.252:47998-48000;"
+ iptables -t nat -A PREROUTING -p udp -i enp7s0 --dport 47998:48000 -j DNAT --to-destination 192.168.211.252:47998-48000
+
+# KDEConnect
+iptables -t nat -C PREROUTING -p tcp -i enp7s0 --dport 1714:1764 -j DNAT --to-destination 192.168.211.252:1714-1764 || \
+ iptables -t nat -A PREROUTING -p tcp -i enp7s0 --dport 1714:1764 -j DNAT --to-destination 192.168.211.252:1714-1764
+
+iptables -t nat -C PREROUTING -p udp -i enp7s0 --dport 1714:1764 -j DNAT --to-destination 192.168.211.252:1714-1764 || \
+ iptables -t nat -A PREROUTING -p udp -i enp7s0 --dport 1714:1764 -j DNAT --to-destination 192.168.211.252:1714-1764
diff --git a/hosts/iroha/scripts/rebuild-modules b/hosts/iroha/scripts/rebuild-modules
index 5938b86..70d0233 100755
--- a/hosts/iroha/scripts/rebuild-modules
+++ b/hosts/iroha/scripts/rebuild-modules
@@ -1,2 +1,4 @@
#! /usr/bin/env sh
-sudo emerge --ask --verbose v4l2loopback xone xpad-noone
+#sudo emerge --ask --verbose v4l2loopback xpad-noone xone
+sudo emerge --ask --verbose v4l2loopback xpad-noone \=games-util/xone-0.3_p20240226
+