blob: 61c232bbba0464b4c4c0a1129773f82ec44cf9e7 (
plain)
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
|
# vim:syntax=rsc:ts=4
# procedure: 1. try manually to uninstall a package. unless that works add it to pkgdis, if it works --> pkguninst.
# leave routeros-* in uninstall.
# 2. put an UPGRADE package into the root folder of the device, put this rsc file on a disk
# 3. execute the rsc file
# ...not yet tested with a downgrade package.
:global pkguninst {"lora";"ups";"gps";"ntp";"openflow";"user-manager";"multicast";"calea";"tr069-client";"routeros-arm"}
:global pkgdis {"ipv6";"wireless";"hotspot";"mpls";"routing";"ppp";"dhcp";"security";"advanced-tools"}
# -------------------------- #
{
:local uptime [/system resource get uptime]
:local cpu [/system resource get cpu]
:local arch [/system resource get architecture-name]
:local board [/system resource get board-name]
:local version [/system resource get version]
:local id [/system/identity/get name]
:put "$id - $board - $version"
:put "CPU: $cpu ($arch) - Uptime: $uptime\n"
}
:put "Setting packages to disabled..."
:foreach pd in=$pkgdis do={
/system package disable $pd
}
:put "Setting packages to uninstall..."
:foreach pu in=$pkguninst do={
/system package uninstall $pu
}
:put "Rebooting..."
/system reboot
|