Merge lp:~gabor.meszaros/opm/lxc_output_fix into lp:opm

Proposed by Gábor Mészáros
Status: Approved
Approved by: Craig Bender
Approved revision: 17
Proposed branch: lp:~gabor.meszaros/opm/lxc_output_fix
Merge into: lp:opm
Diff against target: 12 lines (+1/-1)
1 file modified
bin/opm_functions.sh (+1/-1)
To merge this branch: bzr merge lp:~gabor.meszaros/opm/lxc_output_fix
Reviewer Review Type Date Requested Status
Craig Bender Pending
Review via email: mp+337971@code.launchpad.net

Description of the change

fix for the following issue:
ubuntu@test:~/opm# ./opmctl
/home/ubuntu/opm/bin/opm_functions.sh: line 713: [[:
error: unknown command: network
1: syntax error in expression (error token is ": unknown command: network
1")

To post a comment you must log in.

Unmerged revisions

17. By Gabor Meszaros <email address hidden>

redirect all lxc output to dev/null

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bin/opm_functions.sh'
2--- bin/opm_functions.sh 2018-02-18 21:40:27 +0000
3+++ bin/opm_functions.sh 2018-02-19 17:09:20 +0000
4@@ -710,7 +710,7 @@
5 RELEASE_FIX="${RELEASE_FULL##*.}"
6 RELEASE_TYPE="${RELEASE_DESC##* }"
7 declare -ag PHYSICAL_NICS=($(ip 2>/dev/null link |/bin/grep -oP '(?<=^[0-9]: )[e|s|w][^\:]+'))
8-[[ $(lxc 2>&1>/dev/null network list;echo $?) -eq 0 ]] && declare -ag LXD_BRIDGES=($(lxc 2>/dev/null network list|awk '/YES/{print $2}'))
9+[[ $(lxc &>/dev/null network list;echo $?) -eq 0 ]] && declare -ag LXD_BRIDGES=($(lxc 2>/dev/null network list|awk '/YES/{print $2}'))
10 export PRIMARY_GW=$(ip 2>/dev/null route |awk '/default/{print $3;exit}')
11 export PRIMARY_NIC=$(ip 2>/dev/null route |awk '/default/{print $5;exit}')
12 export PRIMARY_IP=$(ip 2>/dev/null -4 a show dev ${PRIMARY_NIC}|/bin/grep -oP '(?<=inet )[^\/]+')

Subscribers

People subscribed via source and target branches