From 9173dc5bd9fee534664141de8e6f20bc01bc8468 Mon Sep 17 00:00:00 2001 From: Zack Spear Date: Wed, 20 Jan 2021 17:30:57 -0800 Subject: [PATCH 1/3] feat: start of customized registration page --- dynamix.unraid.net.plg | 276 ++++++++++++++++++++++++++++++++++++++++- 1 file changed, 275 insertions(+), 1 deletion(-) diff --git a/dynamix.unraid.net.plg b/dynamix.unraid.net.plg index 9f7654728..8c658d068 100644 --- a/dynamix.unraid.net.plg +++ b/dynamix.unraid.net.plg @@ -30,7 +30,7 @@ if [ -e /etc/rc.d/rc.unraid-api ]; then rm -f /etc/rc.d/rc.unraid-api rm -f /etc/rc.d/rc.flash_backup mv -f /usr/local/emhttp/plugins/dynamix/include/UpdateDNS.php- /usr/local/emhttp/plugins/dynamix/include/UpdateDNS.php - mv -f /usr/local/emhttp/plugins/dynamix/Registration.page- /usr/local/emhttp/plugins/dynamix/Registration.page + mv -f /usr/local/emhttp/plugins/dynamix.unraid.net/Registration.page- /usr/local/emhttp/plugins/dynamix/Registration.page mv -f /usr/local/emhttp/plugins/dynamix/include/DefaultPageLayout.php- /usr/local/emhttp/plugins/dynamix/include/DefaultPageLayout.php mv -f /usr/local/emhttp/plugins/dynamix/DisplaySettings.page- /usr/local/emhttp/plugins/dynamix/DisplaySettings.page rm -rf /boot/config/plugins/Unraid.net/wc @@ -2338,6 +2338,280 @@ _(Header show description)_: + + + + + + + + +_(Thank you for trying Unraid OS)_! + +_(Thank you for choosing Unraid OS)_! + + + +
+:registration_1_plug: +Your server will not be usable until you purchase a Registration key or install a free 30-day *Trial* key. A *Trial* +key provides all the functionality of a *Pro* Registration key. + +Registration keys are bound to your USB Flash boot device serial number (GUID). Please use a high quality name brand device +at least 1GB in size. + +Note: USB memory card readers are generally **not** supported because most do not present unique serial numbers. +:end +_(Important)_: + +:registration_2_plug: ++ Please make sure your [server time](DateTime) is accurate to within 5 minutes. ++ Please make sure there is a [DNS server](NetworkSettings) specified. +:end +
+ + + + +
+:registration_3_plug: +Your *Trial* key includes all the functionality and device support of a *Pro* Registration key. + +After your *Trial* key has reached expiration, your server **still functions normally** until the next time you **Stop** the array. + +At that point, you may either purchase a Registration key, or request a *Trial* extension. +:end +
+ +_(***Trial*** key expires on)_: +: + + + + +
+_(Cannot connect to key-server)_! + +_(Your *Trial* key requires an internet connection)_. _(Please check your)_ [_(Network Settings)_](NetworkSettings). +
+ +_(***Trial*** key expires on)_: +: + + + + +
+_(Release has been withdrawn)_! + +_(This release has been withdrawn for use with *Trial* keys)_. +
+ +_(***Trial*** key expires on)_: +: + + + + +
+_(Your *Trial* key has expired)_. +:registration_4_plug: +To continue using Unraid OS you may purchase a Registration key. Alternately, you may request a *Trial* extension key. + +Most *Trial* extension requests are processed immediately but please allow up to one business day to receive your *Trial* extension key. +:end +
+ + + + +_(Invalid *Trial* Installation)_ +
+:registration_5_plug: +It is not possible to use a *Trial* key with an existing Unraid OS installation. + +You may purchase a Registration key corresponding to this USB Flash device to continue using this installation. + +For more information, please [Contact Support](https://lime-technology.com/contact). +:end +
+ +_(Registered GUID)_: +: + +_(Registered to)_: +: + +_(Registered on)_: +: + +_(Expiration)_: +: + + + + +_(Missing Key File)_ +
+:registration_6_plug: +It appears that your Registration key file is corrupted or missing. The key file should be located in the +[config](/Registration/Browse?dir=/boot/config) directory on your USB Flash boot device. + +If you do not have a backup copy of your Registration key file, [Contact Support](https://lime-technology.com/contact). + +If this was a *Trial* installation, you may purchase a Registration key. +:end +
+ + + + +_(The registered GUID does not match the USB Flash boot device GUID)_ + +
+:registration_7_plug: +*Trial* installations are only valid with the originally registered USB Flash device. + +To continue using this installation with this USB Flash device, you may purchase a Registration key. +:end +
+ +
+:registration_8_plug: +The Registration key file does not correspond to the USB Flash boot device. +Please copy the correct key file to the [config](/Registration/Browse?dir=/boot/config) directory +on your USB Flash boot device. If you do not have a backup copy of your key file, [Contact Support](https://lime-technology.com/contact). + +If you want to replace your Registration key with a new key bound to this USB Flash device, click Replace Key below. An original key may be +replaced anytime. Thereafter, a replacement key may be replaced again after one year has passed. If you require +another replacement key sooner, [Contact Support](https://lime-technology.com/contact). + +**Note:** Replacing a Registration key results in permanently *blacklisting* the previous USB Flash GUID. +:end +
+ + +_(Registered GUID)_: +: + +_(Registered to)_: +: + +_(Registered on)_: +: + + + +_(Expiration): +: + + + +_(Replaceable)_: +: + + + + + +_(Blacklisted USB Flash GUID)_ +
+:registration_9_plug: +This USB Flash boot device has been *blacklisted*. This can occur as a result of transfering your Registration key to +a replacement USB Flash device, and you are currently booted from your old USB Flash device. + +A USB Flash device may also be *blacklisted* if there is no serial number, or if we discover the serial number +is not unique (this is common with USB card readers). + +For more information, please [Contact Support](https://lime-technology.com/contact). +:end +
+ + + + +_(Registered to)_: +: + +_(Registered on)_: +: + +_(Replaceable)_: +: + + + + +_(Error accessing your physical USB Flash boot device)_ +
+_(There is a physical problem accessing your USB Flash boot device)_. _(Please)_ [Contact Support](https://lime-technology.com/contact). + +_(Flash GUID)_: +: _(Error code)_: + + + +_(Flash Vendor)_: +: + +_(Flash Product)_: +: + +_(Flash GUID)_: +: + + + +
+ + +]]> + + + + + + + + From 75b6d4ebaed3df11991ff37b34d287ab61d10707 Mon Sep 17 00:00:00 2001 From: Zack Spear Date: Thu, 21 Jan 2021 11:44:23 -0800 Subject: [PATCH 2/3] refactor: customized registration.page removed duplicated code --- dynamix.unraid.net.plg | 105 ++++++++++++++++++++++------------------- 1 file changed, 56 insertions(+), 49 deletions(-) diff --git a/dynamix.unraid.net.plg b/dynamix.unraid.net.plg index 8c658d068..c16f06d01 100644 --- a/dynamix.unraid.net.plg +++ b/dynamix.unraid.net.plg @@ -2366,7 +2366,6 @@ function my_time_any($time) { function my_time_now($time) { return $time ? _(my_time($time),0) : _('Unknown'); } -$attached_devices=sprintf(_("This server has %s attached storage device".($var['deviceCount']==1?'.':'s.')),$var['deviceCount']); ?> + _(Thank you for trying Unraid OS)_! - + + + _(Thank you for choosing Unraid OS)_! + +
:registration_1_plug: Your server will not be usable until you purchase a Registration key or install a free 30-day *Trial* key. A *Trial* @@ -2403,6 +2407,7 @@ Note: USB memory card readers are generally **not** supported because most do no +
:registration_3_plug: Your *Trial* key includes all the functionality and device support of a *Pro* Registration key. @@ -2413,36 +2418,30 @@ At that point, you may either purchase a Registration key, or request a *Trial* :end
-_(***Trial*** key expires on)_: -: - +
_(Cannot connect to key-server)_! _(Your *Trial* key requires an internet connection)_. _(Please check your)_ [_(Network Settings)_](NetworkSettings).
-_(***Trial*** key expires on)_: -: - +
_(Release has been withdrawn)_! _(This release has been withdrawn for use with *Trial* keys)_.
-_(***Trial*** key expires on)_: -: - +
_(Your *Trial* key has expired)_. :registration_4_plug: @@ -2455,6 +2454,7 @@ Most *Trial* extension requests are processed immediately but please allow up to + _(Invalid *Trial* Installation)_
:registration_5_plug: @@ -2466,21 +2466,10 @@ For more information, please [Contact Support](https://lime-technology.com/conta :end
-_(Registered GUID)_: -: - -_(Registered to)_: -: - -_(Registered on)_: -: - -_(Expiration)_: -: - + _(Missing Key File)_
:registration_6_plug: @@ -2496,8 +2485,11 @@ If this was a *Trial* installation, you may purchase a Registration key. + _(The registered GUID does not match the USB Flash boot device GUID)_ + +
:registration_7_plug: *Trial* installations are only valid with the originally registered USB Flash device. @@ -2505,7 +2497,9 @@ If this was a *Trial* installation, you may purchase a Registration key. To continue using this installation with this USB Flash device, you may purchase a Registration key. :end
+ +
:registration_8_plug: The Registration key file does not correspond to the USB Flash boot device. @@ -2519,31 +2513,12 @@ another replacement key sooner, [Contact Support](https://lime-technology.com/co **Note:** Replacing a Registration key results in permanently *blacklisting* the previous USB Flash GUID. :end
- - -_(Registered GUID)_: -: - -_(Registered to)_: -: - -_(Registered on)_: -: - - - -_(Expiration): -: - - - -_(Replaceable)_: -: + _(Blacklisted USB Flash GUID)_
:registration_9_plug: @@ -2559,19 +2534,39 @@ For more information, please [Contact Support](https://lime-technology.com/conta - + + +_(***Trial*** key expires on)_: +: + + + + + +_(Expiration)_: +: + + + + + _(Registered to)_: : _(Registered on)_: : -_(Replaceable)_: -: + + + + +_(Registered GUID)_: +: + _(Error accessing your physical USB Flash boot device)_
_(There is a physical problem accessing your USB Flash boot device)_. _(Please)_ [Contact Support](https://lime-technology.com/contact). @@ -2581,18 +2576,30 @@ _(Flash GUID)_: +_(Flash GUID)_: +: + + + _(Flash Vendor)_: : _(Flash Product)_: : -_(Flash GUID)_: -: + + +_(Replaceable)_: +: + + + + + +
-
]]> From 0aeb6a1b53292bdd3678b122f8fce4c099ae36bd Mon Sep 17 00:00:00 2001 From: Zack Spear Date: Thu, 21 Jan 2021 11:46:12 -0800 Subject: [PATCH 3/3] chore: clean up comments --- dynamix.unraid.net.plg | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/dynamix.unraid.net.plg b/dynamix.unraid.net.plg index c16f06d01..9f97dade0 100644 --- a/dynamix.unraid.net.plg +++ b/dynamix.unraid.net.plg @@ -2605,16 +2605,14 @@ _(Replaceable)_: ]]> - +