Skip to content

Commit

Permalink
ifup.sh: Add helpful message for when the brctl command is not found
Browse files Browse the repository at this point in the history
In Ubuntu [20.04] for example, the package is not installed by default.
  • Loading branch information
64kramsystem committed Jan 21, 2021
1 parent d5c8d07 commit 76f026b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions scripts/ifup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,10 @@

set -o errexit

if ! [ -x "$(command -v brctl)" ]; then
>&2 echo '`brctl` could not be found; please double check that the package is installed.'
exit 1
fi

brctl addif virbr0 $1
ifconfig $1 up

0 comments on commit 76f026b

Please sign in to comment.