Révision 37 bin/create-filesystem

create-filesystem (revision 37)
18 18

  
19 19
function interactive {
20 20
zfs list
21
echo "*** Choix du pool pour la creation du filesystem : ***"
21
echo "*** Choose a pool for the filesystem to create : ***"
22 22

  
23 23
while read inputline
24 24
do
......
27 27
      zfs list |grep -i $inputline
28 28
      if [ $? -eq 1 ]
29 29
      then
30
         echo "*** Choix du pool pour la creation du filesystem : ***"
30
         echo "*** Choose a pool for the filesystem to create : ***"
31 31
      else
32 32

  
33
         echo "*** Etes-vous sur du choix du pool : $inputline ? (y/n) ***"
33
         echo "*** Are you sur : $inputline ? (y/n) ***"
34 34
         while read inputConfirm
35 35
         do
36 36
            if [ "$inputConfirm" = "y" ]||[ "$inputConfirm" = "n" ]
37 37
            then
38 38
              break
39 39
            fi
40
            echo "*** Etes-vous sur du nom : $inputline ? (y/n) ***"
40
            echo "*** Are you sur : $inputline ? (y/n) ***"
41 41
         done
42 42

  
43 43
          if [ "$inputConfirm" = "y" ]
44 44
          then
45 45
             NAME_POOL=$inputline
46
             echo "Saisir le nom du filesystem : "
46
             echo "filesystem name : "
47 47
             while read inputFS
48 48
             do
49 49
                if [ "$inputFS" != "" ]
......
51 51
                   zfs list |grep -i "$inputFS "
52 52
                   if [ $? -eq 0 ]
53 53
                   then
54
                         echo "Le nom du filesystem existe deja"
54
                         echo "Filesystem name already exists"
55 55
                         FS_OK=1   
56 56
                   else
57 57
                      FS_OK=0 
58 58
                   fi
59 59
                   if [ $FS_OK -eq 1 ]
60 60
                   then
61
                      echo "Saisir le nom du filesystem : "
61
                      echo "filesystem name : "
62 62
                   else
63 63
                      NAME_FS=$inputFS
64 64
                           zfs create $NAME_POOL/$inputFS
65 65
                           if [ $? -eq 0 ]
66 66
                           then
67
                              echo "*** Creation du filesystem ZFS [OK] ***" 
67
                              echo "*** ZFS filesystem Creation [OK] ***" 
68 68
                              zfs list
69 69
                              break
70 70
                           else
71
                              echo "/!\\ Creation du filesystem ZFS [ERROR] /!\\"
71
                              echo "/!\\ ZFS filesystem Creation [ERROR] /!\\"
72 72
                           fi
73 73
                    fi
74 74
                else
75
                  echo "Saisir le nom du filesystem : "
75
                  echo "filesystem name : "
76 76
                fi
77 77
             done
78 78
             break
......
80 80
          break
81 81
      fi
82 82
   else
83
      echo "*** Choix du pool pour la creation du filesystem : ***"
83
      echo "*** Choose a pool for the filesystem to create : ***"
84 84
   fi
85 85
done
86 86
}

Formats disponibles : Unified diff