Add unRAIDServer plugin to webGui.

This commit is contained in:
Tom Mortensen
2016-09-22 10:47:56 -07:00
parent 288451a27b
commit d48395099e
7 changed files with 759 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
Menu="About"
Title="EULA"
---
<?PHP
$file = "/boot/license.txt";
if (file_exists($file)) echo Markdown(file_get_contents($file)); else echo Markdown("** No license file present! **");
?>
<button type="button" onclick="done()">Done</button>
+3
View File
@@ -0,0 +1,3 @@
**unRAID Server OS**
unRAID Server OS by [Lime Technology, Inc.](https://lime-technology.com).
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 580 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

+1
View File
@@ -0,0 +1 @@
This is a "built-in" plugin used to facilitate core unRAID-OS updating.
+747
View File
@@ -0,0 +1,747 @@
<?xml version='1.0' standalone='yes'?>
<!DOCTYPE PLUGIN [
<!ENTITY name "unRAIDServer">
<!ENTITY author "LimeTech">
<!ENTITY version "6.3-2016.09.22">
<!ENTITY pluginURL "https://raw.github.com/limetech/webgui/master/plugins/&name;/&name;.plg">
<!ENTITY category "next">
<!ENTITY zip "https://s3.amazonaws.com/dnld.lime-technology.com/&category;/unRAIDServer-&version;-x86_64.zip">
<!ENTITY md5 "https://s3.amazonaws.com/dnld.lime-technology.com/&category;/unRAIDServer-&version;-x86_64.md5">
<!ENTITY files "bzimage,bzroot*,make_bootable.bat,make_bootable_mac,memtest,*.txt,syslinux/syslinux.cfg-">
<!ENTITY infozip "infozip-6.0-i486-1.txz">
]>
<PLUGIN name="&name;"
author="&author;"
version="&version;"
pluginURL="&pluginURL;">
<CHANGES>
<![CDATA[
unRAID Server OS Change Log
===========================
Version 6.2 2016-09-15
----------------------
- stable release version
Version 6.2.0-rc5 2016-09-04
----------------------------
Base distro:
- gnupg: version 1.4.21 (CVE-2016-6313)
- libgcrypt: version 1.7.3 (CVE-2016-6313)
Linux kernel:
- version 4.4.19
- i2c is now a module instead of builtin
- kernel-firmware: version 20160823git
- upgraded out-of-tree Highpoint Rocket r750: version 1.2.7 - fixes smartctl requests
Management:
- add experimental global share setting: "Tunable (enable Direct IO)"
- fix regression in mac "make bootable" script
- fixed: the combination DHCP static + DNS automatic is not allowed.
- get rid of release validation for -rc releases with Basic/Plus/Pro
- handle cases of ethernet NICs added or removed
- sas device identification: change from WWN to MODEL_SERIALNO_WWN
webGui:
- Add collapsable CPU load details in Dashboard
- Add configurable display of WWN in device ID
- Add CLONE functionality to user shares and disk shares settings
- add underlining when hoovering over links
- Add option to anonymize diagnostics for a bug report
- Added confirmation dialog when "parity is already valid" is checked
- Changed truncation of log files and generation of last200 logs
- docker: Delete failed downloads on template updates
- Enhanced timezone settings and remove "custom" timezone choice
- Fixed NewConfig display of array status
- Fixed: allow ';' (semicolon) character in Docker variables
- Improved feedback for clickable links
- Remove unneeded title messages in links
- Save mail password encrypted in configuration file
Version 6.2.0-rc4 2016-08-18
----------------------------
Base distro:
- curl: version 7.50.1 (CVE-2016-5419, CVE-2016-5420, CVE-2016-5421)
- libidn: version 1.33 (CVE-2015-8948, CVE-2016-6261, CVE-2016-6262, CVE-2016-6263)
- openssh: version 7.3p1 (CVE-2015-8325, CVE-2016-6210)
Linux kernel:
- version 4.4.18 (CVE-2016-5696)
- upgraded out-of-tree Intel 10Gbit Ethernet driver ixgbe: version 4.3.15
Management:
- handle the situation when no network config file exists
- improved mac "make bootable" script device detection
- md/unraid: correct "new array" detection (so as to only permit autostart if no config change)
- mover: support moving 'special files'
- shfs: add 'mknod' support
webGui:
- display date as numeral in Parity history
- expanded CPU thread pairings
- expanded Share status and additional help
- expanded system devices text
- fixed disk name in SMART report of diagnostics
- fixed invalid Docker placeholder icons on dashboard
- fixed network counters and errors on dashboard, when VLANs are used
- fixed selection of list elements
- fixed suppress disk utilization threshold settings for additional disks in cache pool
- fixed suppress spinup group on ALL cache devices
- improve responsiveness of unassigned devices
- include nvme disks in SMART report of diagnostics
- purge Docker icon after container removal, also helps reload outdated icons
Version 6.2.0-rc3 2016-07-27
----------------------------
Base distro:
- php: version 5.6.24 (CVE-2016-5385, CVE-2016-6207)
Management:
- added "make bootable" script and syslinux for Linux clients
- emhttp: ignore case in parsing http header fields
- md/unraid: correct detection of new non-precleared disk(s) added to array
- mover: add hard link support
- mover: fix symlink support
- shfs: add hard link support
webGui:
- correctly handle symlink location display when browsing user share
- show reboot notice when a unRAID OS update applied and awaiting a reboot
- show warning for Server Name when it doesn't meet NetBIOS standards
Version 6.2.0-rc2 2016-07-13
----------------------------
Base distro:
- samba: version 4.4.5 (CVE-2016-2119)
Linux kernel:
- version 4.4.15
- added Adaptec HBA 1000-8i drivers per user request
Management:
- better console message if USB flash missing the proper label during boot
- correct logic auto-creating the shares: appdata,domains,isos,system
- experimental shfs hard-link support (probably will be removed)
webGui:
- docker: fix populate variable descriptions for v1 templates
- docker: inherit text color for basic/advanced view toggle's off state
- docker: trim trailing spaces from certain input box values
- prevent "unavailable" as first entry in parity history
- remove SMART error history when new config is performed
- suppress non-present disks in disk include/exclude list
Version 6.2.0-rc1 2016-07-08
----------------------------
Base distro:
- Slackware64-14.2 base distro
- gd: version 2.2.1 (CVE-2015-8874, CVE-2016-3074)
- kernel-firmware: version 20160628git
- pcre: version 8.39 (CVE-2016-1283)
- php: version 5.6.23 (CVE-2016-5766, CVE-2016-5767, CVE-2016-5768, CVE-2016-5769, CVE-2016-5770, CVE-2016-5771, CVE-2016-5772, CVE-2016-5773)
- wget: version 1.18 (CVE-2016-4971)
Linux kernel:
- version 4.4.14
- added config options:
- SCSI_PM8001: PMC-Sierra SPC 8001 SAS/SATA Based Host Adapter driver (per user request)
- SCSI_STEX: Promise SuperTrak EX Series support (per user request)
Management:
- correct typo in boot device comment
- docker: fix handling of config/docker.cfg default docker settings
- fix handling of non-standard boot device label
- networking: prevent invalid USE_DHCP="no" and DHCP_KEEPRESOLV="no" (or empty) combination
- md/unraid: prevent multiple kernel threads from updating super.dat file at the same time
- remove device limit on Trial key.
- shfs/mover: support user share cache mode "prefer"
- Trial key now supports unlimited storage devices
webGui:
- added 'preset current configuration' with New Config utility
- Allow multiple disk selection in NewPerms utility
- docker: fix device pass-through (container target was always coming up empty before)
- docker: fix update to always request manifest.v2 information
- docker: fix update/create to skip any remaining operations and display the error messages when 'docker pull' fails
- docker: improved cache handling for docker container/image information which may have solved some rare cases of showing stale info on the web ui
- docker settings: show warnings next to paths when array is stopped or when they are invalid; hide vdisk size under advanced view
- fix hiding VM help block about creating a new VM when editing a existing VM
- fix ip address update if the system initially gets a local link address (169.254.x.x)
- fix year added in parity history when browser is opened
- include all network interfaces in diagnostics
- include scsi attached drives in diagnostics
- permit share 'Use cache' configuration even if no cache disk/pool exists.
- remove conflicting generation of docker.cfg file
- remove conflicting generation of domain.cfg file
- remove SMART config files when "New Config" is done
- sort plugins alphabetically
- show disconnected ethX interfaces on the dashbaord
- vm manager: add 'virtio-win-0.1.118-2' to VirtIO-ISOs list
- vm manager: check free space before attempting to download OpenELEC file
- vm manager: check free space before attempting to download LibreELEC file
- vm manager: check free space before attempting to download VirtIO ISO file
- vm manager: fix showing vnc input controls when a real GPU is selected while toggling from basic to advanced view
- vm manager: hide files starting with a . (dot) from showing up in the file pickers
- vm manager: remove 'VirtIO' as a option from the CDRom Bus dropdowns
- vm manager: whitelist 'tainted: high-privileges' and 'tainted: host-cpu' as regular text during log color coding
- vm settings: fix handling of config/domain.cfg default libvirt settings
- vm settings: hide vdisk size input under advanced view
- vm settings: prevent virtio-iso download if ISO share/path doesn't exist
- vm settings: show warnings next to paths when array is stopped or when they are invalid
Version 6.2.0-beta23 2016-06-11
-------------------------------
Linux kernel:
- added Mellanox network drivers per user request:
- MLX5_CORE: Mellanox Technologies ConnectX-4 and Connect-IB core driver
- MLX5_CORE_EN: Mellanox Technologies ConnectX-4 Ethernet support
- MLXSW_CORE: Mellanox Technologies Switch ASICs support
- MLXSW_PCI: PCI bus implementation for Mellanox Technologies Switch ASICs
Management:
- fix: ensure hwdb is updated for lsusb descriptions
webGui:
- Fixed regex validation for IPv4 (e.g. 208.67.220.220 now works)
- Fixed eth0 port status detection and port up/down execution
- Fixed display on dashboard when parity is invalid
- VM Manager: add 'virtio-win-0.1.117' and 'virtio-win-0.1.118' to VirtIO-ISOs list
- VM Manager: add LibreELEC to the template list
Version 6.2.0-beta22 2016-06-08
-------------------------------
Base distro:
- ca-certificates: version 20160104
- curl: version 7.49.1 (CVE-2016-3739)
- gnutls: version 3.4.13 (CVE-2016-4456)
- kernel-firmware: version 20160601git
- libarchive: version 3.1.2 (CVE-2016-1541)
- libgcrypt: version 1.7.0
- libxml2: version 2.9.4 (CVE-2016-4447, CVE-2016-4448, CVE-2016-4449)
- mesa: version 11.2.2
- mozilla-firefox: version 45.0.2
- ntp: version 4.2.8p8 (CVE-2016-1551, CVE-2016-1549, CVE-2016-2516, CVE-2016-2517, CVE-2016-2518, CVE-2016-2519, CVE-2016-1547, CVE-2016-1548, CVE-2015-7704, CVE-2015-8138, CVE-2016-1550, CVE-2016-4953, CVE-2016-4954, CVE-2016-4955, CVE-2016-4956, CVE-2016-4957)
- openssl: version 1.0.2h (CVE-2016-2108, CVE-2016-2107, CVE-2016-2105, CVE-2016-2106, CVE-2016-2109, CVE-2016-2176)
- php: version 5.6.22 (CVE-2016-3074, CVE-2015-8865, CVE-2016-4073, CVE-2016-4072, CVE-2016-4071, CVE-2016-4070, CVE-2013-7456, CVE-2016-5093, CVE-2016-5094, CVE-2016-5096)
- qemu: version 2.5.1.1 (CVE-2016-3712, CVE-2016-3710)
- samba: version 4.4.4 (CVE-2015-5370, CVE-2016-2110, CVE-2016-2111, CVE-2016-2112, CVE-2016-2113, CVE-2016-2114, CVE-2016-2115, CVE-2016-2118)
- smartmontools: version 6.5
Management:
- allow kernel append parameter 'unraidlabel' to override boot device label (default: UNRAID)
- fix source url in smartmontools drivedb updater script (update-smart-drivedb)
- fix rare deadlock case when there are insufficient free stripes for a large I/O
- support dual-device "swap/disable" function
- Support spaces in docker and libvirt image file paths.
Linux kernel:
- version 4.4.13
- added config options:
- NIU: Sun Neptune 10Gbit Ethernet support (per user request)
- added VLAN (802.1q) network and bridge support
- updated nbd module option 'max_part' value to 64 (per user request)
webGui:
- docker: bug fix: allow official docker image updates to work
- docker: don't download banner images anymore (banners were removed a while back)
- fix custom setting in Parity Check Schedule
- fix regression error in Browse function
- include year in parity history
- networking: VLAN and multiple ethernet support (Thanks Bergware!)
- numerous cosmetic and typo fixes
- upgraded jQuery to version 2.2.4
- upgraded font-awesome to version 4.6.3
- vm manager: add 'virtio-win-0.1.113' to VirtIO-ISOs list
- vm manager: add '6.0.3' to the OpenELEC versions list
- vm manager: bug fix: don't reset vDisk Location dropdown to 'None' when 'Manual' should be selected
- vm manager: clean up virtio-iso download progress
- vm manager: OpenELEC download folder should default to <domain share folder> if it exists
- vm settings: allow option to remove libvirt image
- vm settings: bug fix: spinning download button
Version 6.2.0-beta21 2016-04-05
-------------------------------
Base distro:
- at: version 3.1.19
- curl: version 7.48.0
- dbus: version 1.10.8
- glibc-zoneinfo: version 2016c
- kernel-firmware: version 20160401
- libevent: version 2.0.22
- lvm2: version 2.02.148
- php: version 5.6.20
- qemu: version 2.5.1
- samba: version 4.4.0
- sudo: version 1.8.16
- xkeyboard-config: version 2.17
Management:
- Fixed a few bugs in mac version of syslinux
- rc.local: disabled irqbalance service from automatically starting
- Fix container hostpath validation in rc.docker.
- Updated smartmontool drivedb.h
Linux kernel:
- added config options:
- DM_MIRROR: Mirror target (per user request)
- unraid: Fix parity size not checked against size of new device(s) added to existing array.
- unraid: Fix non-present disabled data device size not checked against new parity device size.
webGui:
- Version: 2016-04-05
- VM Manager: add German vnc keyboard choice
- Improved core separation display for AMD cpus on System Devices page
- Fix: Templates not updating
- Fix single line display of non-hyperthreaded cores on Dashboard page
- Make direct link to plugin update optional in notice. Allows for direct download or redirect to plugin manager
- Show parity history with newest entry at top and oldest entry at bottom
- Add unRAID OS/Dynamix GUI update message in footer
- API for plugins to test and display a new version message
- Force refresh of file when content has changed, and file is viewed in browser
- Check for disk not present in status report
- Group disk types (parity, data, cache) in status report
- Improved core separation on Dashboard page
- Docker: add RO/Slave path option
- Docker: Do not override /config Name or Display for V2 templates
- Docker: remove spaces from container names
- Fixed regression error in Browse function
- vnc viewer: code updates from upstream (Make sure to copy arrays when using render queue)
- Upgraded jQuery to version 2.2.2
- Change min width of navbar items (@anthony0030)
Version 6.2.0-beta20 2016-03-25
-------------------------------
Base distro:
- aaa_elflibs: version 14.2
- ethtool: version 4.5
- glibc-zoneinfo: version 2016b
- lvm2: version lvm2-2.02.147
- mc: version 4.8.16
- pciutils: version 3.4.1
- pkgtools: version 14.2
- procps-ng: version 3.3.11
- mozilla-firefox: version 45.0.1
- harfbuzz: version harfbuzz-1.2.4
- utempter: version 1.1.6
Linux kernel:
- version 4.4.6
- added missing firmware: ast_dp501_fw.bin
- use out-of-tree drivers:
- Intel 10Gbit Ethernet driver ixgbe: version 4.3.13
- Intel 10Gbit Ethernet driver ixgbevf: version 3.1.2
- Highpoint Rocket r750: version 1.2.4
Management:
- Add halt_poll_ns=0 to kvm.conf - eliminates high cpu overhead in windows 10 [kudos to Eric S. for this!]
- Fix auto-start array
- Fix upgrade process erroneous reference of /boot/config/domains.cfg to /boot/config/domain.cfg
- Quiet extraneous nfs start messages.
- When necessary to query keyserver, poll up to 45 seconds for a connection.
webGui:
- docker: Add Template Authoring Mode.
- docker: Add the ability to keep templates in sync with the authors modifications
- docker: Fix: wrong variable name prevents config creation
- docker: Set default port mode to TCP and path mode to RW
- dynamix: Introduce context-sensitive help
- dynamix: Get rid of SMART db update in monitor
- Do not activate context-sensitive help functionality for Docker and VMs pages yet
Version 6.2.0-beta19 2016-03-17
-------------------------------
Base distro:
- fix NFS mounts and warnings about missing IPv6
- removed obsolete 'apmd' and 'portmap' packages
- acpid: version 2.0.26
- docker: version 1.10.3
- cryptsetup: version 1.7.1
- grep: version 2.24
- gtk+3: version 3.18.9
- htop: version 2.0.1
- libdrm: version 2.4.67
- libnl3: version 3.2.27
- lvm2: version 2.02.145
- mozilla-firefox: version 45.0 (console GUI mode)
- mpfr: version 3.1.4
- nettle: version 3.2
- openssh: version 7.2p2
- p11-kit: version 0.23.2
- pciutils: version 3.4.1
- rpcbind: version 0.2.3
- samba: version: 4.3.6
- xorg-server: version 1.18.2
Linux kernel:
- version 4.4.5
- added config options:
- AMD_IOMMU_V2: AMD IOMMU Version 2 driver
- INTEL_IOMMU_SVM: Support for Shared Virtual Memory with Intel IOMMU
- SCSI_HPSA: HP Smart Array SCSI driver [per customer request for testing, may be removed]
- unraid: Correct sync start/end timestamps.
- unraid: Fix device spindown bug.
- unraid: Fix NEW_ARRAY case of Q not set invalid.
- unraid: Refinement in 'invalidslot' handling
Management:
- Certain mount errors can actually leave device mounted, so un-mount if any error detected.
- Change 'color' status of non-present parity devices from 'red-off' to 'grey-off'.
- correctly handle dual-parity "trust parity" flag.
- fix 'bash' error in /etc/rc.d/rc.6 (shutdown) script.
- Fix disks_mounted event generated after svcs_started.
- Get rid of "Identify" operation.
- Incorporate gfjardim suggestion to mark /mnt "shared" for better Docker integration.
- upgrade process now copies/upgrades bzroot-gui and syslinux/syslinux.cfg-
webGui:
- docker: always show the 'Add another Path, Port or Variable' button
- docker: export ports as variable if Network is set to host
- docker: fix 'WebUI' content menu item now hidden when the web ui link is empty
- docker: removed 'Dry Run' button on create/edit container page
- docker: update pop-in dialogs to look better when using the Dynamix black theme
- Do not display unassigned parity devices when array is Started.
- fix context menu to escape non-safe css selector characters
- fix when disk rebuild is complete, notification reports status "Canceled"
- vm manager: Fix cdrom bus type to use SATA when machine type is Q35
Version 6.2.0-beta18 2016-03-11
-------------------------------
Changes vs. unRAID Server OS 6.1.9.
Base distro:
- switch to 'slackware64-current' base packages
- avahi: version 0.6.32
- beep: version 1.3
- docker: version 1.10.2
- eudev: version 3.1.5a: support NVMe
- fuse: version 2.9.5
- irqbalance: version 1.1.0
- jemalloc: version 4.0.4
- libestr: version 0.1.10
- liblogging: version 1.0.5
- libusb: version 1.0.20
- libvirt: version 1.3.1
- lshw: version B.02.17 svn2588
- lz4: version r133
- mozilla-firefox: version 44.0.2 (console GUI mode)
- netatalk: version 3.1.8
- numactl: version 2.0.11
- php: version 5.6.19
- qemu: version 2.5.0
- rsyslog: version 8.16.0
- samba:
- version: 4.3.5
- enable asynchronous I/O in /etc/samba/smb.conf
- remove 'max protocol = SMB3' from /etc/samba/smb.conf (automatic negotiation chooses the appropriate protocol)
- spice: version 0.12.6
- xorg-server: version 1.18.1
- yajl: version 2.1.0
Linux kernel:
- version 4.4.4
- default iommu to passthrough (iommu=pt)
- kvm: enabled nested virtualization
- unraid: array PQ support (dual-parity)
Management:
- Trial key now supports 6 devices, validates with limetech keyserver
- Pro key supports max 30 array devices, unlimited attached devices
- add 10Gb ethernet tuning in /etc/sysctl.conf
- add tunable: md_write_method (so-called "turbo write")
- array PQ support (dual-parity)
- do not auto-start parity operation when Starting array in Maintenance mode
- libvirt image file handling
- stop md/unraid driver cleanly upon system poweroff/reset
- support NVMe storage devices assignable to array and cache/pool
- support USB storage devices assignable to array and cache/pool
- system shares handling
- misc other improvements and bug fixes
webGui:
- all fixes and enhancements from 6.1.9
- added hardware profile page
- added service status labels to docker and vm manager settings pages
- docker: revamped docker container edit page (thanks gfjardim!)
- docker: now using docker v2 index/repos
- docker: updating a stopped container will keep it stopped upon completion
- dyanmix-6.2: version 2016-03-11
- reverse the negative logic in docker and libvirt image fsck confirmation
- support user specified network MTU value
- vm manager: usb3 controller support, improved usb device sorting and display
- vm manager: integrated virtio driver iso downloader
- vm manager: support nvidia with hyper-v for windows guests
- vm manager: added auto option for vdisk location
- misc other improvements and bug fixes
]]>
</CHANGES>
<!--
Be compatible with unRAID-5 installplg
-->
<FILE Name="/tmp/&name;.sh" Run="/bin/bash">
<INLINE>
rm /tmp/&name;.sh
# cleanup possibly failed previous download/install attempt
rm -rf /tmp/&name;*
mkdir /tmp/&name;
# check if this is unRAID-5
source /etc/unraid-version
if [ "${version:0:2}" == "5." ]; then
# prevent endless install loop
rm -rf /boot/plugins/&name;.plg
rm -rf /boot/config/plugins/&name;.plg
# check if 64-bit capable CPU
if ! grep -q " lm" /proc/cpuinfo ; then
echo "CPU is not 64-bit capable"
exit 1
fi
# Wait until network is ready by pinging google - thanks bonienl!
ip=8.8.4.4
timer=30
while [[ $timer -gt 0 ]]; do
if [[ -n $(route -n|awk '/^0.0.0.0/{print $2}') &amp;&amp; $(ping -qnc1 $ip|awk '/received/{print $4}') -eq 1 ]]; then
break
fi
((timer--))
sleep 1
done
if [[ $timer -eq 0 ]]; then
echo "No network communication !!!"
exit 1
fi
# unRAID-5 needs infozip
if [ ! -f /boot/extra/&infozip; ]; then
echo "Downloading &infozip; package"
mkdir -p /boot/extra
wget http://slackware.cs.utah.edu/pub/slackware/slackware-13.1/slackware/a/&infozip; -O /boot/extra/&infozip;
upgradepkg --install-new /boot/extra/&infozip;
fi
# download the release
if ! wget --no-check-certificate &zip; -O /tmp/&name;.zip ; then
echo "&zip; download error $?"
exit 1
fi
if ! wget --no-check-certificate &md5; -O /tmp/&name;.md5 ; then
echo "&md5; download error $?"
exit 1
fi
fi
</INLINE>
</FILE>
<!--
Download release from S3
For unRAID-5 this will be skipped because already downloaded above
For unRAID-6 we download here, verifying certificiate
-->
<FILE Name="/tmp/&name;.zip">
<URL>&zip;</URL>
</FILE>
<FILE Name="/tmp/&name;.md5">
<URL>&md5;</URL>
</FILE>
<FILE Name="/tmp/&name;.sh" Run="/bin/bash">
<INLINE>
rm /tmp/&name;.sh
# check download and extract
sum1=$(/usr/bin/md5sum /tmp/&name;.zip)
sum2=$(cat /tmp/&name;.md5)
if [ "${sum1:0:32}" != "${sum2:0:32}" ]; then
echo "wrong md5"
exit 1
fi
if ! unzip -d /tmp/&name; /tmp/&name;.zip ; then
echo "unzip error $?"
exit 1
fi
# check if enough free space on flash
have=$(df -k /boot | awk ' END { print $4 } ')
need=$(du -Ssk /tmp/&name; | awk ' END { print $1 } ')
source /etc/unraid-version
if [ "${version:0:2}" == "5." ]; then
# to permit another upgrade
need=$(($need * 2))
fi
# add some margin for possible additional config info
need=$(($need + 8192))
if [ $need -gt $have ]; then
echo "boot device shows $have free but upgrade needs $need"
exit 1
fi
# move release files to flash
mkdir -p /boot/&name;
rm -rf /boot/&name;/*
if ! mv /tmp/&name;/{&files;} /boot/&name; ; then
echo "flash write error $?, maybe corrupted?"
rm -rf /boot/&name;/*
exit 1
fi
# preserve previous version
source /etc/unraid-version
if [ "${version:0:2}" == "6." ]; then
mkdir -p /boot/previous
rm -rf /boot/previous/*
mv /boot/{&files;} /boot/previous
else
mkdir -p /boot/unRAID5
rm -rf /boot/unRAID5/*
# preserve all files in root of flash except ldlinux.sys needed to boot
find /boot -maxdepth 1 -type f -not -name ldlinux.sys -exec mv {} /boot/unRAID5 \;
# preserve a few directories
mv /boot/extra /boot/unRAID5 &amp;&gt; /dev/null
mv /boot/packages /boot/unRAID5 &amp;&gt; /dev/null
mv /boot/plugins /boot/unRAID5 &amp;&gt; /dev/null
mkdir /boot/unRAID5/config
mv /boot/config/plugins /boot/unRAID5/config &amp;&gt; /dev/null
# grab a fresh 'go' file
mv /boot/config/go /boot/unRAID5/config
cp /tmp/&name;/config/go /boot/config
# ensure key file is in the 'config' directory
cp /boot/unRAID5/*.key /boot/config &amp;&gt; /dev/null
fi
# move new version files into place
mv /boot/&name;/* /boot
rmdir /boot/&name;
# move the new syslinux.cfg- in to the syslinux folder
if [ -f /boot/syslinux.cfg- ]; then
mv /boot/syslinux.cfg- /boot/syslinux
fi
# if unRaid-6 replace the readme file
if [ "${version:0:2}" == "6." ]; then
echo "**REBOOT REQUIRED!**" &gt; /usr/local/emhttp/plugins/&name;/README.md
fi
# when upgrading any version prior to 6.2
if [ "${version:0:3}" \&lt; "6.2" ]; then
if ! grep -q '/bzroot-gui' /boot/syslinux/syslinux.cfg &amp;&gt; /dev/null ; then
sed -i 's|menu title Lime Technology\r|menu title Lime Technology, Inc.\r|g' /boot/syslinux/syslinux.cfg &amp;&gt; /dev/null
sed -i 's|label unRAID OS Safe Mode (no plugins)|label unRAID OS GUI Mode\r\n kernel /bzimage\r\n append initrd=/bzroot,/bzroot-gui\r\nlabel unRAID OS Safe Mode (no plugins, no GUI)|g' /boot/syslinux/syslinux.cfg &amp;&gt; /dev/null
fi
fi
# when upgrading any version prior to 6.1
if [ "${version:0:3}" \&lt; "6.1" ]; then
if ! grep -q 'shareDisk' /boot/config/share.cfg &amp;&gt; /dev/null ; then
echo 'shareDisk="yes"' &gt;&gt; /boot/config/share.cfg
fi
fi
# when upgrading from 6.0.x
if [ "${version:0:3}" == "6.0" ]; then
sed -i 's|dynamix.docker.manager/dockerupdate.php|dynamix.docker.manager/scripts/dockerupdate.php|g' /boot/config/plugins/dynamix/docker-update.cron &amp;&gt; /dev/null
sed -i 's|sbin/monitor|emhttp/plugins/dynamix/scripts/monitor|g' /boot/config/plugins/dynamix/monitor.cron &amp;&gt; /dev/null
sed -i 's|/root/mdcmd|/usr/local/sbin/mdcmd|g' /boot/config/plugins/dynamix/parity-check.cron &amp;&gt; /dev/null
sed -i 's|sbin/plugincheck|emhttp/plugins/dynamix.plugin.manager/scripts/plugincheck|g' /boot/config/plugins/dynamix/plugin-check.cron &amp;&gt; /dev/null
sed -i 's|sbin/statuscheck|emhttp/plugins/dynamix/scripts/statuscheck|g' /boot/config/plugins/dynamix/status-check.cron &amp;&gt; /dev/null
fi
# if template-repos does not exist
if [ ! -e /boot/config/plugins/dockerMan/template-repos ]; then
mkdir -p /boot/config/plugins/dockerMan
echo "https://github.com/limetech/docker-templates" &gt; /boot/config/plugins/dockerMan/template-repos
fi
echo "syncing - please wait..."
sync
echo "Update successful - PLEASE REBOOT YOUR SERVER"
</INLINE>
</FILE>
<!--
The 'remove' script.
-->
<FILE Name="/tmp/&name;.sh" Run="/bin/bash" Method="remove">
<INLINE>
rm /tmp/&name;.sh
# unRAID-5 doesn't support 'remove' method, so we're done
source /etc/unraid-version
if [ "${version:0:2}" == "5." ]; then
exit 0
fi
if [ -d /boot/previous ]; then
# restore previous unRAID-6 release
mv /boot/previous/* /boot
rmdir /boot/previous
echo "**REBOOT REQUIRED!**" &gt; /usr/local/emhttp/plugins/&name;/README.md
elif [ -d /boot/unRAID5 ]; then
# restore previous unRAID-5 release
rm -rf /boot/extra
mv /boot/unRAID5/extra /boot &amp;&gt; /dev/null
rm -rf /boot/plugins
mv /boot/unRAID5/plugins /boot &amp;&gt; /dev/null
rm -rf /boot/packages
mv /boot/unRAID5/packages /boot &amp;&gt; /dev/null
rm -rf /boot/config/plugins
mv /boot/unRAID5/config/plugins /boot/config &amp;&gt; /dev/null
mv /boot/unRAID5/config/go /boot/config
rmdir /boot/unRAID5/config
mv /boot/unRAID5/* /boot
rmdir /boot/unRAID5
else
echo "Cannot remove, no previous version"
exit 1
fi
echo "syncing..."
sync
echo "Remove successful - PLEASE REBOOT YOUR SERVER"
</INLINE>
</FILE>
</PLUGIN>