Exemplo n.º 1
0
        public static void Dir(string directory)
        {
            var mntDir = MountHelper.SetDirsPath(directory);

            Directory.CreateDirectory(directory);
            Directory.CreateDirectory(mntDir);
            SetBind(mntDir, directory);
        }
Exemplo n.º 2
0
        public void SetOverlayDirectory(string overlayPath)
        {
            var overlayDir = Parameter.Overlay;
            var path       = overlayPath.Replace(Parameter.Overlay, "");
            var dirsPath   = MountHelper.SetDirsPath(path);

            Bash.Execute($"mkdir -p {dirsPath}", false);
            Bash.Execute($"rsync -aHA --delete-during {overlayDir}/ {dirsPath}/", false);
            Bash.Execute($"rm -fR {path}", false);
            _mount.Dir(path);
        }
Exemplo n.º 3
0
 public static void WorkingDirectories()
 {
     foreach (var dir in DefaultWorkingDirectories)
     {
         var mntDir = MountHelper.SetDirsPath(dir);
         Directory.CreateDirectory(dir);
         Directory.CreateDirectory(mntDir);
         if (MountHelper.IsAlreadyMounted(dir))
         {
             continue;
         }
         ConsoleLogger.Log($"mount {mntDir} -> {dir}");
         SetBind(mntDir, dir);
     }
     foreach (var kvp in DefaultWorkingDirectoriesWithOptions)
     {
         if (MountHelper.IsAlreadyMounted(kvp.Key) == false)
         {
             Bash.Execute($"mount {kvp.Value} {kvp.Key}", false);
         }
     }
 }