Initial Commit

This commit is contained in:
Grzegorz Budny 2019-11-24 17:29:37 +01:00
parent fee1e16817
commit 1744ffa992
3 changed files with 61 additions and 0 deletions

18
RouterOS_Format_Drive.rsc Normal file
View file

@ -0,0 +1,18 @@
# RouterOS Function
# Copyright (c) Grzegorz Budny
# Formats RouterOS additional drive
:global FormatDrive do={
:local driveLabel [/disk get number=$drive label];
:log warning ("...:::Drive ".$drive." ".$driveLabel." will be formatted!");
/disk eject-drive $drive;
/disk format-drive $drive file-system=$fileSystem label=$label;
:log info ("...:::Drive ".$drive." has been formatted to ".$fileSystem." with label ".$label);
}
$FormatDrive drive=0 fileSystem=ext3 label=data;