Commit 061a7e29b1d294acf56f64b1a07e71e48969947f

Authored by hmalti
1 parent b02be524

Corrections

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