diff options
author | Daniil Baturin <daniil@vyos.io> | 2025-06-10 16:09:33 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-06-10 16:09:33 +0100 |
commit | b40e7a2de9daa866b6423391ba7fe5b1bfa7e67c (patch) | |
tree | f8b4fb9cb779c6e8277c296446c7ea2954f275e0 /src | |
parent | fbaf05c6abcb9d428c85e04e49af5dafc35d0194 (diff) | |
parent | 1d3242006cca9d78009667f06ad4d73b1bb2ef54 (diff) | |
download | vyos-1x-b40e7a2de9daa866b6423391ba7fe5b1bfa7e67c.tar.gz vyos-1x-b40e7a2de9daa866b6423391ba7fe5b1bfa7e67c.zip |
Merge pull request #4550 from dmbaturin/T7527-eliminate-embedded-op-mode-shell-snippets
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 |