Changeset 4cf0198 for fedd


Ignore:
Timestamp:
Mar 12, 2014 10:59:12 AM (11 years ago)
Author:
Ted Faber <faber@…>
Branches:
master
Children:
d846cbe
Parents:
a80a4a7
Message:

Cleaner connect/disconnect

File:
1 edited

Legend:

Unmodified
Added
Removed
  • fedd/federation/desktop_access.py

    ra80a4a7 r4cf0198  
    418418            print >>f, 'sleep 60; done'
    419419            print >>f, ('ssh -w 0:0 -p %s -o "Tunnel ethernet" ' + \
    420                     '-o "StrictHostKeyChecking no" -i %s %s perl -I/usr/local/federation/lib /usr/local/federation/bin/setup_bridge.pl --tapno=0 --addr=%s --use_file &') % \
     420                    '-o "StrictHostKeyChecking no" -i %s %s perl ' +
     421                    '-I/usr/local/federation/lib ' +
     422                    '/usr/local/federation/bin/setup_bridge.pl --tapno=0 ' +
     423                    '--addr=%s --use_file &') % \
    421424                    (port, self.ssh_identity, peer, my_addr)
    422425            # This should give the tap a a chance to come up
     
    452455                print >>f, '%s -D FORWARD -i tap0 -o %s -j ACCEPT' % \
    453456                        (self.iptables, self.nat_interface)
    454             # Linux ?
    455             print >>f, 'ifconfig tap0 destroy'
    456             self.unset_route(peer, f)
     457            print >>f, 'pkill -f setup_bridge.pl'
    457458            print >>f, 'mv /etc/hosts.DETER.fedd.hold /etc/hosts'
     459            print >>f, ('ssh -p %s -o "StrictHostKeyChecking no" -i %s %s ' +
     460                'perl -I/usr/local/federation/lib ' +
     461                '/usr/local/federation/bin/unsetup_bridge.pl --tapno=0 ' +
     462                '--addr=%s') % \
     463                    (port, self.ssh_identity, peer, my_addr)
    458464            print >>f, 'kill `cat /var/run/quagga/ospfd.pid`'
    459465            print >>f, 'kill `cat /var/run/quagga/zebra.pid`'
Note: See TracChangeset for help on using the changeset viewer.