#!/usr/bin/sh #---------------------------------------------------------------------------- # /var/install/bin/bonding-show-info # # Creation: 2022-12-30 hbfl # Last Update: $Id$ # # Copyright (c) 2014-@@YEAR@@ Holger Bruenjes, holgerbruenjes(at)gmx(dot)net # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. #---------------------------------------------------------------------------- # include eislib . /var/install/include/eislib # include config . /etc/config.d/bonding # --------------------------------------------------------------------------- # get bond devices # --------------------------------------------------------------------------- get_bond_devices() { eval bond_idx=${BONDING_N:-0} for i in ${bond_idx} do ndev=$((${bond_idx} - 1)) if [ -f /proc/net/bonding/bond${ndev} ] then show bond${ndev} fi done } # --------------------------------------------------------------------------- # main # --------------------------------------------------------------------------- show() { local bond=${1} echo mecho --info "${bond} device settings" echo cat /proc/net/bonding/${bond} echo anykey } # --------------------------------------------------------------------------- # main # --------------------------------------------------------------------------- main() { get_bond_devices } # --------------------------------------------------------------------------- # exec main # --------------------------------------------------------------------------- main "${@}" # --------------------------------------------------------------------------- # end # ---------------------------------------------------------------------------