Blame view

remove_bridge.sh 390 Bytes
3e470988   hmalti   First commit
1
  #!/bin/bash
5721892d   hmalti   Avancées
2
  NAME_BRIDGE_TO_REMOVE=$1;
3e470988   hmalti   First commit
3
4
  
  #vérification que l'utilisateur donne bien un nom à l'image
5721892d   hmalti   Avancées
5
  if [[ -z "$NAME_BRIDGE_TO_REMOVE" ]]; then 
3e470988   hmalti   First commit
6
7
8
    echo "Il faut donner le nom du bridge à supprimer ! Relancez la commande avec les bons arguments."
    exit
  fi
5721892d   hmalti   Avancées
9
10
11
12
  
  rm $PATH_MANIFEST/bridges/$NAME_BRIDGE_TO_REMOVE.manifest
  ip link set $NAME_BRIDGE_TO_REMOVE down
  brctl delbr $NAME_BRIDGE_TO_REMOVE