Myślę, że zrobiłem to prościej.

Gotowiec;
<legend class="sectionheader">Sterowanie przekaznikami</legend>
<table>
<tr>
<td><form action="zalacz.sh" method="post"><input class="default_button" type="submit" value="Załącz "><? cat /dev/d1 ?></form></td>
<td><form action="wylacz.sh" method="post"><input class="default_button" type="submit" value="Wyłącz"></form></td>
</tr>
<tr>
<td><form action="zalacz1.sh" method="post"><input class="default_button" type="submit" value="Załącz "><? cat /dev/d2 ?></form></td>
<td><form action="wylacz1.sh" method="post"><input class="default_button" type="submit" value="Wyłącz"></form></td>
</tr>
</table>
</fieldset>
A w plikach zalacz.sh, wylacz.sh itp, itd.
#!/bin/sh
echo 0 > /dev/ttyUSB0 && echo "Telefon ON" > /dev/d1
<?
eval $( gargoyle_session_validator -c "$COOKIE_hash" -e "$COOKIE_exp" -a "$HTTP_USER_AGENT" -i "$REMOTE_ADDR" -r "login.sh" -t $(uci get gargoyle.global.session_timeout) -b "$COOKIE_browser_time" )
gargoyle_header_footer -h -s "system" -p "plugins" -c "internal.css" -j "table.js plugins.js"
?>
Albo
#!/bin/sh
echo 1 > /dev/ttyUSB0 && echo "Telefon OFF" > /dev/d1
<?
eval $( gargoyle_session_validator -c "$COOKIE_hash" -e "$COOKIE_exp" -a "$HTTP_USER_AGENT" -i "$REMOTE_ADDR" -r "login.sh" -t $(uci get gargoyle.global.session_timeout) -b "$COOKIE_browser_time" )
gargoyle_header_footer -h -s "system" -p "plugins" -c "internal.css" -j "table.js plugins.js"
?>
itp, itd.
Koniec.