Commit 061a7e29b1d294acf56f64b1a07e71e48969947f

Authored by hmalti
1 parent b02be524

Corrections

create_container.sh
... ... @@ -59,7 +59,7 @@ PID=$!
59 59 echo "PID Unshare :$PID"
60 60  
61 61 FILE=$NOM_CONTAINER.manifest
62   -date=$(date)
  62 +date=$(date +"%Y-%m-%d-%Hh-%Mm-%Ss")
63 63  
64 64 echo "nom_container:$NOM_CONTAINER" >> $FILE #nom du conteneur
65 65 echo "nom_image:$NOM_IMAGE" >> $FILE #nom de son image
... ... @@ -154,5 +154,6 @@ for (( i=0 ; i < ${#ARRAY_INTERFACES[*]} ; i++)); do
154 154 done
155 155  
156 156 #On supprime la première virgule exédentaire
157   -STRING_INTERFACE=$(echo $STRING_INTERFACE | sed -e 's/^.//')
  157 +
  158 +STRING_INTERFACE=${STRING_INTERFACE:1}
158 159 echo "interfaces:$STRING_INTERFACE" >> $FILE
159 160 \ No newline at end of file
... ...
exec_container.sh
... ... @@ -2,7 +2,7 @@
2 2  
3 3 while getopts c: o; do
4 4 case $o in
5   - (c) $NOM_CONTAINER=$OPTARG;;
  5 + (c) NOM_CONTAINER=$OPTARG;;
6 6 esac
7 7 done
8 8  
... ...
list_container.sh
... ... @@ -8,10 +8,12 @@ do
8 8 NOM_IMAGE=$(grep nom_image $eachfile | cut -d ':' -f2)
9 9 PID=$(grep pid $eachfile | cut -d ':' -f2)
10 10 TIME=$(grep starting_time $eachfile | cut -d':' -f2)
  11 + INTERFACES=$(grep interfaces $eachfile | cut -d':' -f2)
11 12 echo "----------------------"
12   - echo "Nom container $NOM_CONTAINER"
  13 + echo "Nom container: $NOM_CONTAINER"
13 14 echo "Nom image: $NOM_IMAGE"
14 15 echo "PID: $PID"
15   - echo "Startint time: $TIME"
  16 + echo "Starting time: $TIME"
  17 + echo "Interfaces: $INTERFACES"
16 18 echo "----------------------"
17 19 done
... ...