/mandos/release

To get this branch, use:
bzr branch http://bzr.recompile.se/loggerhead/mandos/release

« back to all changes in this revision

Viewing changes to network-hooks.d/wireless

* mandos (Client.enable, Client.disable, ClientDBus.approve): Call
                    self.send_changedstate() after change, not before.
  (Client.disable): Bug fix: Handle disable_initiator_tag and
                    checker_initiator_tag of 0.
  (Client.init_checker): Bug fix: Remove old checker_initiator_tag and
                         disable_initiator_tag, if any.
  (Client.bump_timeout): Bug fix: Remove old disable_initiator_tag, if
                         any.
  (ClientDBus.Timeout_dbus_property): Bug fix: Use self.expires.
  (ClientHandler.handle): Bug fix: timedelta_to_milliseconds is a
                          global function, not a class method.
* mandos-monitor (MandosClientWidget._update_timer_callback_lock):
  Removed.  All users changed.
  (MandosClientWidget.last_checked_ok): Removed (unused).
  (MandosClientWidget.__init__): Don't call self.using_timer().
  (MandosClientWidget.property_changed): Removed unused version.
  (MandosClientWidget.using_timer): Stop using the counter
                                    self._update_timer_callback_lock;
                                    be strictly boolean.
  (MandosClientWidget.need_approval): Don't call self.using_timer().
  (MandosClientWidget.update): Call self.using_timer() throughout.
                               Bug fix: Never show negative timers.

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
# configuration file(s) should be copied into the
7
7
# /etc/mandos/network-hooks.d directory.
8
8
9
 
# Copyright © 2012-2018 Teddy Hogeborn
10
 
# Copyright © 2012-2018 Björn Påhlsson
 
9
# Copyright © 2012 Teddy Hogeborn
 
10
# Copyright © 2012 Björn Påhlsson
11
11
12
12
# Copying and distribution of this file, with or without modification,
13
13
# are permitted in any medium without royalty provided the copyright
35
35
    exit
36
36
fi
37
37
 
38
 
ifkeys=`sed -n -e 's/^ADDRESS_\([^=]*\)=.*/\1/p' "$CONFIG" | sort -u`
 
38
ifkeys=`env | sed -n -e 's/^ADDRESS_\([^=]*\)=.*/\1/p' "$CONFIG" \
 
39
    | sort -u`
39
40
 
40
41
# Exit if DEVICE is set and is not any of the wireless interfaces
41
42
if [ -n "$DEVICE" ]; then
43
44
        for KEY in $ifkeys; do
44
45
            ADDRESS=`eval 'echo "$ADDRESS_'"$KEY"\"`
45
46
            INTERFACE=`addrtoif "$ADDRESS"`
46
 
            
47
 
            case "$DEVICE" in
48
 
                *,"$INTERFACE"|*,"$INTERFACE",*|"$INTERFACE",*|"$INTERFACE")
49
 
                    break 2;;
50
 
            esac
 
47
            if [ "$INTERFACE" = "$DEVICE" ]; then
 
48
                break 2
 
49
            fi
51
50
        done
52
51
        exit
53
52
    done
123
122
        ROUTES=`eval 'echo "$ROUTES_'"$KEY"\"`
124
123
        if [ -n "$ROUTES" ]; then
125
124
            for route in $ROUTES; do
126
 
                "$ip" route add "$route" dev "$INTERFACE"
 
125
                "$ip" route add "$route" dev "$BRIDGE"
127
126
            done
128
127
        fi
129
128
    done