From a6a293116e7489a48c8673e0c665ae30a44f8bda Mon Sep 17 00:00:00 2001 From: Cameron Thompson <50184035+iamromulan@users.noreply.github.com> Date: Sat, 7 Dec 2024 01:44:54 -0500 Subject: [PATCH] Update MTU function --- rcPCIe_SDXPINN_toolkit.sh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/rcPCIe_SDXPINN_toolkit.sh b/rcPCIe_SDXPINN_toolkit.sh index 85c3d60..a68aac2 100644 --- a/rcPCIe_SDXPINN_toolkit.sh +++ b/rcPCIe_SDXPINN_toolkit.sh @@ -226,12 +226,11 @@ mtu_setup() { > "$mtu_file" elif [[ "$response" =~ ^[0-9]+$ ]]; then echo "Setting MTU override to $response..." - # Write the dynamic MTU script to the configuration file - { - echo "for iface in \$(ls /sys/class/net | grep '^rmnet_data'); do" - echo " ip link set \$iface mtu $response" - echo "done" - } > "$mtu_file" + # Write single commands for each interface to the configuration file + > "$mtu_file" # Clear the file + for iface in $(ls /sys/class/net | grep '^rmnet_data'); do + echo "ip link set $iface mtu $response" >> "$mtu_file" + done else echo "Invalid input. Please enter a number, 'exit', or '0'." fi @@ -240,6 +239,7 @@ mtu_setup() { + set_root_passwd() { passwd }