diff options
author | Daniil Baturin <daniil@baturin.org> | 2025-06-09 19:34:00 +0100 |
---|---|---|
committer | Daniil Baturin <daniil@baturin.org> | 2025-06-10 14:57:14 +0100 |
commit | 1d3242006cca9d78009667f06ad4d73b1bb2ef54 (patch) | |
tree | bf30922a340e0043a66c3cbec828319e29572079 /src | |
parent | 594e776e1c84b967a02867b467317c99a0c5ae27 (diff) | |
download | vyos-1x-1d3242006cca9d78009667f06ad4d73b1bb2ef54.tar.gz vyos-1x-1d3242006cca9d78009667f06ad4d73b1bb2ef54.zip |
op-mode: T7527: move assorted embedded shel snippets to script files
Diffstat (limited to 'src')
-rwxr-xr-x | src/op_mode/install_mok.sh | 7 | ||||
-rwxr-xr-x | src/op_mode/show_bonding_detail.sh | 7 | ||||
-rwxr-xr-x | src/op_mode/show_ppp_stats.sh | 5 | ||||
-rwxr-xr-x | src/op_mode/update_suricata.sh | 8 |
4 files changed, 27 insertions, 0 deletions
diff --git a/src/op_mode/install_mok.sh b/src/op_mode/install_mok.sh new file mode 100755 index 000000000..29f78cd1f --- /dev/null +++ b/src/op_mode/install_mok.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +if test -f /var/lib/shim-signed/mok/vyos-dev-2025-shim.der; then + mokutil --ignore-keyring --import /var/lib/shim-signed/mok/vyos-dev-2025-shim.der; +else + echo "Secure Boot Machine Owner Key not found"; +fi diff --git a/src/op_mode/show_bonding_detail.sh b/src/op_mode/show_bonding_detail.sh new file mode 100755 index 000000000..62265daa2 --- /dev/null +++ b/src/op_mode/show_bonding_detail.sh @@ -0,0 +1,7 @@ +#!/bin/sh + +if [ -f "/proc/net/bonding/$1" ]; then + cat "/proc/net/bonding/$1"; +else + echo "Interface $1 does not exist!"; +fi diff --git a/src/op_mode/show_ppp_stats.sh b/src/op_mode/show_ppp_stats.sh new file mode 100755 index 000000000..d9c17f966 --- /dev/null +++ b/src/op_mode/show_ppp_stats.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +if [ -d "/sys/class/net/$1" ]; then + /usr/sbin/pppstats "$1"; +fi diff --git a/src/op_mode/update_suricata.sh b/src/op_mode/update_suricata.sh new file mode 100755 index 000000000..6e4e605f4 --- /dev/null +++ b/src/op_mode/update_suricata.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +if test -f /run/suricata/suricata.yaml; then + suricata-update --suricata-conf /run/suricata/suricata.yaml; + systemctl restart suricata; +else + echo "Service Suricata not configured"; +fi |