#!/bin/sh /etc/rc.common START=10 tps23861_poe_ctrl () { local section="$1" local num mode config_get num "$section" port_num config_get mode "$section" admin_mode if [ "$mode" == "1" ]; then output=$(tps23861-poe-ctrl -p "${num}" -P on) echo "<6>${output}" > "/dev/kmsg" else output=$(tps23861-poe-ctrl -p "${num}" -P off) echo "<6>${output}" > "/dev/kmsg" fi } start(){ . /lib/functions.sh board=$(board_name) case $board in sonicfi,rap630w-311g|\ cybertan,eww631-b1) config_load poe config_foreach tps23861_poe_ctrl port ;; *) ;; esac }