--- mcore-src/trunk/mcore-tools/daemon/client/include/network.client.class 2013/05/10 10:45:18 2075 +++ mcore-src/trunk/mcore-tools/daemon/client/include/network.client.class 2013/05/10 10:45:38 2076 @@ -6,7 +6,7 @@ help_network_hostname() { mecho "get network.hostname" - mecho " displays the current hostname" + mecho " Displays the current hostname" mecho mecho "set network.hostname [hostname]" mecho " Sets the hostname of the system" @@ -68,12 +68,34 @@ help_network_iface() { + mecho "get network.iface" + mecho " Lists all configured network interfaces" + mecho mecho "set network.iface [iface] [networking] [ip] [netmask] [broadcast] [network]" + mecho " Configure network interfaces" mecho " iface - the interface name" mecho " networking - may be 'static' or 'dhcp'" mecho " ip, netmask, broadcast and network are optional and only required on static networking" } +get_network_iface() +{ + local iface + for iface in $(find ${MROOT}/etc/conf.d -maxdepth 1 -name 'net.*' -printf '%f\n') + do + case ${iface} in + # exclude routes and samples + net.sample|net.routes) continue ;; + esac + rvecho -n "${iface//net.}" + ( cat ${MROOT}/etc/conf.d/${iface}; echo ) | while read line + do + rvecho -n ";${line}" + done + rvecho + done +} + set_network_iface() { local iface="$1"