-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathRouterOS_RB750GR3_DUDE_Setup.rsc
More file actions
42 lines (25 loc) · 990 Bytes
/
RouterOS_RB750GR3_DUDE_Setup.rsc
File metadata and controls
42 lines (25 loc) · 990 Bytes
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
# RouterOS Function
# Copyright (c) Grzegorz Budny
# Version 1.0
# Last update: 3/23/2020
# DUDE Server initial setup on RB750GR3 with microSD or USB drive
:global SetupDudeRB750GR3 do={
:local isDude [/system packages find name=dude];
:if ($isDude) do={
:log info "...:::Started DUDE Server Setup:::...";
:log warning "...:::Formatting drive:::...";
/disk eject-drive $driveNumber;
:do {
/disk format-drive $driveNumber file-system=ext3 label=$driveLabel;
} on-error={
:log critical "...:::Formatting failed. Check your drive:::...";
}
:log info "...:::Formatting finished:::...";
/dude set data-directory=$dudeDirectory;
/dude set enabled=yes;
}\
else={
:log critical "...:::Setup failed. Install DUDE package first:::...";
}
}
$SetupDudeRB750GR3 driveNumber=driveNumber driveLabel=driveLabel dudeDirectory=directoryName;