-
Notifications
You must be signed in to change notification settings - Fork 46
/
Copy pathexample.cmd
37 lines (30 loc) · 1020 Bytes
/
example.cmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
@echo off
rem '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
rem File Name:
rem example.cmd
rem
rem Abstract:
rem This script is an example script using flexvolume on Windows node, it will do nothing
rem Note: This is a FlexVolume Driver Without Master-initiated Attach/Detach
rem '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
if "%~1"=="init" goto init
if "%~1"=="mount" goto mount
if "%~1"=="unmount" goto unmount
:usage
echo example.cmd init
echo example.cmd mount [mount dir] [mount device] [json params]
echo example.cmd unmount [unmount dir]
goto :eof
:init
@echo {"status": "Success", "capabilities": {"attach": false}}
goto :eof
:mount
rem following line is only for debugging purpose
rem @echo "mount", %~2, %~3, %~4 >> c:\k\example.log
rem md %~2
@echo {"status": "Success"}
goto :eof
:unmount
rem following line is only for debugging purpose
rem @echo "unmount", %~2, %~3, %~4 >> c:\k\example.log
rm -rf %~2