-
Notifications
You must be signed in to change notification settings - Fork 13
/
uuTapeArchive.r
47 lines (41 loc) · 1.58 KB
/
uuTapeArchive.r
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
38
39
40
41
42
43
44
45
46
47
# \file uuTapeArchive.r
# \author Lazlo Westerhof
# \copyright Copyright (c) 2021-2024, Utrecht University. All rights reserved.
# \license GPLv3, see LICENSE.
# \brief Perform dmput command.
#
# \param[in] data Physical path of data object.
# \param[in] dmfs Current DMF state of data object.
#
dmput(*data, *hostAddress, *dmfs) {
#if (*dmfs not like "DUL" && *dmfs not like "OFL" && *dmfs not like "UNM" && *dmfs not like "MIG") {
msiExecCmd("dmput", *data, *hostAddress, "", "", *dmRes);
msiGetStdoutInExecCmdOut(*dmRes, *dmStat);
writeString("serverLog", "DEBUG: $userNameClient:$clientAddr - Archive dmput started: *data. Returned Status - *dmStat.");
#}
}
# \brief Perform dmget command.
#
# \param[in] data Physical path of data object.
# \param[in] dmfs Current DMF state of data object.
#
dmget(*data, *hostAddress, *dmfs) {
#if (*dmfs not like "DUL" && *dmfs not like "REG" && *dmfs not like "UNM" && *dmfs not like "MIG") {
msiExecCmd("dmget", *data, *hostAddress, "", "", *dmRes);
msiGetStdoutInExecCmdOut(*dmRes, *dmStat);
writeString("serverLog", "DEBUG: $userNameClient:$clientAddr - Archive dmget started: *data. Returned Status - *dmStat.");
#}
}
# \brief Perform dmattr command.
#
# \param[in] data Physical path of data object.
# \param[out] dmfs Current DMF state of data object.
#
dmattr(*data, *hostAddress, *dmfs) {
msiExecCmd("dmattr", *data, *hostAddress, "", "", *dmRes);
msiGetStdoutInExecCmdOut(*dmRes, *dmfs);
*dmfs = trimr(*dmfs, "\n");
if (*dmfs like "") {
*dmfs = "INV";
}
}