Blame view

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