From c15e2a1ca6f9abaaa751a9712de7b3b24bec64c8 Mon Sep 17 00:00:00 2001 From: John Klug Date: Mon, 23 Oct 2017 18:34:40 -0500 Subject: Fix error messages from bt-pan to syslog --- recipes-connectivity/bluez/bluez5/bt-pan/bt-pan | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'recipes-connectivity/bluez') diff --git a/recipes-connectivity/bluez/bluez5/bt-pan/bt-pan b/recipes-connectivity/bluez/bluez5/bt-pan/bt-pan index 987ecaa..f142bb1 100755 --- a/recipes-connectivity/bluez/bluez5/bt-pan/bt-pan +++ b/recipes-connectivity/bluez/bluez5/bt-pan/bt-pan @@ -332,23 +332,20 @@ def main(args=None): if opts.call == 'server': + inm = opts.iface_name brctl = subprocess.Popen( - ['brctl', 'show', opts.iface_name], + ['brctl', 'show', inm], stdout=open(os.devnull, 'wb'), stderr=subprocess.PIPE ) brctl_stderr = brctl.stderr.read() - p = lambda fmt='',*a,**k: print(fmt.format(*a,**k), file=sys.stderr) writePidFile(opts.iface_name) if brctl.wait() or brctl_stderr: - p = lambda fmt='',*a,**k: print(fmt.format(*a,**k), file=sys.stderr) - p('brctl check failed for interface: {}', opts.iface_name) - lg.error('brctl check failed for interface (missing?): {}', opts.iface_name) - p() - p('Bridge interface must be added and configured before starting server, e.g. with:') - p(' brctl addbr bnep-bridge') - p(' brctl setfd bnep-bridge 0') - p(' brctl stp bnep-bridge off') - p(' ip addr add 10.101.225.84/24 dev bnep-bridge') - p(' ip link set bnep-bridge up') + lg.error('brctl check failed for interface (missing?): {}'.format(inm)) + lg.error('Bridge interface must be added and configured before starting server, e.g. with:') + lg.error(' brctl addbr {}'.format(inm)) + lg.error(' brctl setfd {} 0'.format(inm)) + lg.error(' brctl stp {} off'.format(inm)) + lg.error(' ip addr add 10.101.225.84/24 dev {}'.format(inm)) + lg.error(' ip link set {} up'.format(inm)) return 1 servers = list() -- cgit v1.2.3