Blame view

bridge.sh 1.58 KB
3e470988   hmalti   First commit
1
  #!/bin/bash
17bfc359   hmalti   Help Image+contai...
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
  if [ $# -lt 1 ]; then
      printf "Nom \n"
      printf "\t \t Bridge\n"
      printf "SYNOPSIS \n"
      printf "\t \t baleine bridge <COMMANDES> [arguments]\n"
      printf "Description: \n \n"
      printf "La commande 'bridge' permet de créer des bridges Linux, en supprimer et lister les bridges existants (Nom) " 
      printf "Les commandes sont :\n \n"
      printf "\t %-10s %-10s \n" "<create>"  "crée un bridge."
      printf "\t \t [-b], [NOM_BRIDGE]\n \n" 
      printf "\t \t [-a], [ADDR_IPV4]\n \n" 
      printf " \t %-10s %-10s \n" "<list>"  "liste les bridges existants ainsi que leurs manifestes."
      printf " \t %-10s %-10s \n" "<remove>"  "Supprime le bridge donné en argument."
      printf "\t \t [-b], --bridge [NOM_BRIDGE]\n \n"
      printf " \t %-10s %-10s \n" "<up>"  "Met up le bridge donné en argument."
      printf "\t \t [-b], --bridge [NOM_BRIDGE]\n \n"
      printf " \t %-10s %-10s \n" "<down>"  "Met down le bridge donné en argument."
      printf "\t \t [-b], --bridge [NOM_BRIDGE]\n \n"
3e470988   hmalti   First commit
20
  
17bfc359   hmalti   Help Image+contai...
21
22
      printf "Utilisez baleine <commande> help pour plus d'informations à propos d'une commande.\n"
  fi
5721892d   hmalti   Avancées
23
  case $1 in
3e470988   hmalti   First commit
24
25
26
  
      "create")
          #Si on veut creer un bridge (qu'on a apellé le script ./balaine.sh bridge create)
5721892d   hmalti   Avancées
27
          bash create_bridge.sh "${@:2}"
3e470988   hmalti   First commit
28
29
30
          ;;
      "list")
          #Si on veut lister les bridges (qu'on a apellé le script ./balaine.sh bridge list)
5721892d   hmalti   Avancées
31
          bash list_bridges.sh "${@:2}"
3e470988   hmalti   First commit
32
33
          ;;
      "remove")
5721892d   hmalti   Avancées
34
          bash remove_bridge.sh "${@:2}"
3e470988   hmalti   First commit
35
36
             ;;
      "up")
5721892d   hmalti   Avancées
37
          bash up_bridge.sh "${@:2}"
3e470988   hmalti   First commit
38
39
             ;;
      "down")
5721892d   hmalti   Avancées
40
          bash down_bridge.sh "${@:2}"
3e470988   hmalti   First commit
41
  esac