- add support for bridges in read/write hardware bindings

This commit is contained in:
Stanislav Ievlev 2009-04-10 11:48:17 +04:00
parent f18fa040df
commit be45b8e021
4 changed files with 11 additions and 7 deletions

View File

@ -11,7 +11,7 @@ Source:%name-%version.tar
Summary: alterator module for tcp/ip connections configuration
License: GPL
Group: System/Configuration/Other
Requires: alterator >= 4.7-alt3 alterator-sh-functions >= 0.6-alt5 libshell >= 0.0.1-alt4
Requires: alterator >= 4.7-alt3 alterator-sh-functions >= 0.6-alt5 alterator-hw-functions libshell >= 0.0.1-alt4
Requires: alterator-l10n >= 2.1-alt9
Requires: alterator-net-common >= 0.7-alt1
Requires: alterator-net-wifi >= 0.5-alt1

View File

@ -185,6 +185,7 @@ list_configuration()
read_hw_binding()
{
local name="$(real_iface "$1")";shift
local config=
if [ -f "$cachedir/iftab" ];then
@ -193,7 +194,7 @@ read_hw_binding()
config="/etc/iftab"
fi
local line="$(grep "^[[:space:]]*$1[[:space:]]" "$config")"
local line="$(grep "^[[:space:]]*$name[[:space:]]" "$config")"
if [ -z "$line" ]; then
echo "missing"
@ -337,12 +338,12 @@ write_configuration()
write_hw_binding()
{
local name="$1";shift
local name="$(real_iface "$1")";shift
local value="$1";shift
local config="$cachedir/iftab"
local mac="$(ifread "$name"|cut -f1)"
local businfo="$(ifread "$name"|cut -f2)"
local mac="$(netdev_read_mac "$name")"
local businfo="$(netdev_read_businfo "$name")"
if [ -s "$config" ]; then
sed -r \

View File

@ -31,7 +31,7 @@
;;; UI
width 500
width 600
height 300
(gridbox
@ -61,8 +61,8 @@ height 300
(label colspan 2)
;;
(spacer)
(hbox align "left"
colspan 2
(button (_ "OK") name "ok")
(button (_ "Cancel") name "cancel")))

View File

@ -61,6 +61,9 @@
;;; UI
width 400
height 200
(edit name "prev_name" text "" visibility #f)
(gridbox
columns "0;100"