Author: mherger
Date: Mon Jan 30 09:01:43 2012
New Revision: 33776
URL: http://svn.slimdevices.com/slim?rev=33776&view=rev
Log:
Bug: 17852
Description: initial stab at an add-on template for the newer ReadyNAS firmware required for v2 machines
Added:
7.7/trunk/platforms/readynas/addon_template/
7.7/trunk/platforms/readynas/addon_template/.SQUEEZEBOX_BUILD_SETTINGS
7.7/trunk/platforms/readynas/addon_template/SQUEEZEBOX.conf
7.7/trunk/platforms/readynas/addon_template/SQUEEZEBOX.html
7.7/trunk/platforms/readynas/addon_template/SQUEEZEBOX.js
7.7/trunk/platforms/readynas/addon_template/SQUEEZEBOX.xml
7.7/trunk/platforms/readynas/addon_template/SQUEEZEBOX_AVAILABLE.xml
7.7/trunk/platforms/readynas/addon_template/SQUEEZEBOX_CURRENT.xml
7.7/trunk/platforms/readynas/addon_template/SQUEEZEBOX_HANDLER.pl
7.7/trunk/platforms/readynas/addon_template/SQUEEZEBOX_service
7.7/trunk/platforms/readynas/addon_template/addons.conf
7.7/trunk/platforms/readynas/addon_template/files/
7.7/trunk/platforms/readynas/addon_template/install.sh
7.7/trunk/platforms/readynas/addon_template/language/
7.7/trunk/platforms/readynas/addon_template/language/de/
7.7/trunk/platforms/readynas/addon_template/language/de/SQUEEZEBOX.str
7.7/trunk/platforms/readynas/addon_template/language/en-us/
7.7/trunk/platforms/readynas/addon_template/language/en-us/SQUEEZEBOX.str
7.7/trunk/platforms/readynas/addon_template/language/fr/
7.7/trunk/platforms/readynas/addon_template/language/fr/SQUEEZEBOX.str
7.7/trunk/platforms/readynas/addon_template/language/ja/
7.7/trunk/platforms/readynas/addon_template/language/ja/SQUEEZEBOX.str
7.7/trunk/platforms/readynas/addon_template/language/ko/
7.7/trunk/platforms/readynas/addon_template/language/ko/SQUEEZEBOX.str
7.7/trunk/platforms/readynas/addon_template/language/zh-cn/
7.7/trunk/platforms/readynas/addon_template/language/zh-cn/SQUEEZEBOX.str
7.7/trunk/platforms/readynas/addon_template/language/zh-tw/
7.7/trunk/platforms/readynas/addon_template/language/zh-tw/SQUEEZEBOX.str
7.7/trunk/platforms/readynas/addon_template/remove.sh
7.7/trunk/platforms/readynas/addon_template/running.sh
7.7/trunk/platforms/readynas/addon_template/squeezebox_1.0.bin (with props)
7.7/trunk/platforms/readynas/addon_template/start.sh
7.7/trunk/platforms/readynas/addon_template/stop.sh
7.7/trunk/platforms/readynas/addons_sdk/
7.7/trunk/platforms/readynas/addons_sdk/CHANGELOG
7.7/trunk/platforms/readynas/addons_sdk/CVS/
7.7/trunk/platforms/readynas/addons_sdk/CVS/Entries
7.7/trunk/platforms/readynas/addons_sdk/CVS/Entries.Log
7.7/trunk/platforms/readynas/addons_sdk/CVS/Repository
7.7/trunk/platforms/readynas/addons_sdk/CVS/Root
7.7/trunk/platforms/readynas/addons_sdk/LICENSE
7.7/trunk/platforms/readynas/addons_sdk/README
7.7/trunk/platforms/readynas/addons_sdk/addon.config
7.7/trunk/platforms/readynas/addons_sdk/bin/
7.7/trunk/platforms/readynas/addons_sdk/bin/CVS/
7.7/trunk/platforms/readynas/addons_sdk/bin/CVS/Entries
7.7/trunk/platforms/readynas/addons_sdk/bin/CVS/Repository
7.7/trunk/platforms/readynas/addons_sdk/bin/CVS/Root
7.7/trunk/platforms/readynas/addons_sdk/bin/build_addon (with props)
7.7/trunk/platforms/readynas/addons_sdk/bin/create_addon (with props)
7.7/trunk/platforms/readynas/addons_sdk/bin/xmlutil.arm (with props)
7.7/trunk/platforms/readynas/addons_sdk/bin/xmlutil.nsp (with props)
7.7/trunk/platforms/readynas/addons_sdk/bin/xmlutil.x86 (with props)
7.7/trunk/platforms/readynas/addons_sdk/template/
7.7/trunk/platforms/readynas/addons_sdk/template/ADDON.conf (with props)
7.7/trunk/platforms/readynas/addons_sdk/template/ADDON.html (with props)
7.7/trunk/platforms/readynas/addons_sdk/template/ADDON.js (with props)
7.7/trunk/platforms/readynas/addons_sdk/template/ADDON.xml (with props)
7.7/trunk/platforms/readynas/addons_sdk/template/ADDON_AVAILABLE.xml (with props)
7.7/trunk/platforms/readynas/addons_sdk/template/ADDON_CURRENT.xml (with props)
7.7/trunk/platforms/readynas/addons_sdk/template/ADDON_HANDLER.pl (with props)
7.7/trunk/platforms/readynas/addons_sdk/template/ADDON_service (with props)
7.7/trunk/platforms/readynas/addons_sdk/template/CVS/
7.7/trunk/platforms/readynas/addons_sdk/template/CVS/Entries
7.7/trunk/platforms/readynas/addons_sdk/template/CVS/Entries.Log
7.7/trunk/platforms/readynas/addons_sdk/template/CVS/Repository
7.7/trunk/platforms/readynas/addons_sdk/template/CVS/Root
7.7/trunk/platforms/readynas/addons_sdk/template/install.sh (with props)
7.7/trunk/platforms/readynas/addons_sdk/template/language/
7.7/trunk/platforms/readynas/addons_sdk/template/language/CVS/
7.7/trunk/platforms/readynas/addons_sdk/template/language/CVS/Entries
7.7/trunk/platforms/readynas/addons_sdk/template/language/CVS/Entries.Log
7.7/trunk/platforms/readynas/addons_sdk/template/language/CVS/Repository
7.7/trunk/platforms/readynas/addons_sdk/template/language/CVS/Root
7.7/trunk/platforms/readynas/addons_sdk/template/language/de/
7.7/trunk/platforms/readynas/addons_sdk/template/language/de/ADDON.str
7.7/trunk/platforms/readynas/addons_sdk/template/language/de/CVS/
7.7/trunk/platforms/readynas/addons_sdk/template/language/de/CVS/Entries
7.7/trunk/platforms/readynas/addons_sdk/template/language/de/CVS/Repository
7.7/trunk/platforms/readynas/addons_sdk/template/language/de/CVS/Root
7.7/trunk/platforms/readynas/addons_sdk/template/language/en-us/
7.7/trunk/platforms/readynas/addons_sdk/template/language/en-us/ADDON.str
7.7/trunk/platforms/readynas/addons_sdk/template/language/en-us/CVS/
7.7/trunk/platforms/readynas/addons_sdk/template/language/en-us/CVS/Entries
7.7/trunk/platforms/readynas/addons_sdk/template/language/en-us/CVS/Repository
7.7/trunk/platforms/readynas/addons_sdk/template/language/en-us/CVS/Root
7.7/trunk/platforms/readynas/addons_sdk/template/language/fr/
7.7/trunk/platforms/readynas/addons_sdk/template/language/fr/ADDON.str
7.7/trunk/platforms/readynas/addons_sdk/template/language/fr/CVS/
7.7/trunk/platforms/readynas/addons_sdk/template/language/fr/CVS/Entries
7.7/trunk/platforms/readynas/addons_sdk/template/language/fr/CVS/Repository
7.7/trunk/platforms/readynas/addons_sdk/template/language/fr/CVS/Root
7.7/trunk/platforms/readynas/addons_sdk/template/language/ja/
7.7/trunk/platforms/readynas/addons_sdk/template/language/ja/ADDON.str
7.7/trunk/platforms/readynas/addons_sdk/template/language/ja/CVS/
7.7/trunk/platforms/readynas/addons_sdk/template/language/ja/CVS/Entries
7.7/trunk/platforms/readynas/addons_sdk/template/language/ja/CVS/Repository
7.7/trunk/platforms/readynas/addons_sdk/template/language/ja/CVS/Root
7.7/trunk/platforms/readynas/addons_sdk/template/language/ko/
7.7/trunk/platforms/readynas/addons_sdk/template/language/ko/ADDON.str
7.7/trunk/platforms/readynas/addons_sdk/template/language/ko/CVS/
7.7/trunk/platforms/readynas/addons_sdk/template/language/ko/CVS/Entries
7.7/trunk/platforms/readynas/addons_sdk/template/language/ko/CVS/Repository
7.7/trunk/platforms/readynas/addons_sdk/template/language/ko/CVS/Root
7.7/trunk/platforms/readynas/addons_sdk/template/language/zh-cn/
7.7/trunk/platforms/readynas/addons_sdk/template/language/zh-cn/ADDON.str
7.7/trunk/platforms/readynas/addons_sdk/template/language/zh-cn/CVS/
7.7/trunk/platforms/readynas/addons_sdk/template/language/zh-cn/CVS/Entries
7.7/trunk/platforms/readynas/addons_sdk/template/language/zh-cn/CVS/Repository
7.7/trunk/platforms/readynas/addons_sdk/template/language/zh-cn/CVS/Root
7.7/trunk/platforms/readynas/addons_sdk/template/language/zh-tw/
7.7/trunk/platforms/readynas/addons_sdk/template/language/zh-tw/ADDON.str
7.7/trunk/platforms/readynas/addons_sdk/template/language/zh-tw/CVS/
7.7/trunk/platforms/readynas/addons_sdk/template/language/zh-tw/CVS/Entries
7.7/trunk/platforms/readynas/addons_sdk/template/language/zh-tw/CVS/Repository
7.7/trunk/platforms/readynas/addons_sdk/template/language/zh-tw/CVS/Root
7.7/trunk/platforms/readynas/addons_sdk/template/remove.sh
7.7/trunk/platforms/readynas/addons_sdk/template/running.sh
7.7/trunk/platforms/readynas/addons_sdk/template/start.sh
7.7/trunk/platforms/readynas/addons_sdk/template/stop.sh
Added: 7.7/trunk/platforms/readynas/addon_template/.SQUEEZEBOX_BUILD_SETTINGS
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addon_template/.SQUEEZEBOX_BUILD_SETTINGS?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addon_template/.SQUEEZEBOX_BUILD_SETTINGS (added)
+++ 7.7/trunk/platforms/readynas/addon_template/.SQUEEZEBOX_BUILD_SETTINGS Mon Jan 30 09:01:43 2012
@@ -1,0 +1,8 @@
+
+DETAIL_URL=http://wiki.slimdevices.com
+CURRENT_URL=http://downloads.slimdevices.com/lms/logitechmediaserver_latest.xml
+ICON_URL=https://mysqueezebox.com/static/images/logitech-logo.png
+REBOOT_REQUIRED=n
+RESTART_APACHE=n
+MIN_RAIDIATOR_VERSION=4.1.3
+
Added: 7.7/trunk/platforms/readynas/addon_template/SQUEEZEBOX.conf
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addon_template/SQUEEZEBOX.conf?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addon_template/SQUEEZEBOX.conf (added)
+++ 7.7/trunk/platforms/readynas/addon_template/SQUEEZEBOX.conf Mon Jan 30 09:01:43 2012
@@ -1,0 +1,5 @@
+Alias /SQUEEZEBOX /etc/frontview/addons/ui/SQUEEZEBOX
+<Location /SQUEEZEBOX>
+ Options ExecCGI
+ Allow from all
+</Location>
Added: 7.7/trunk/platforms/readynas/addon_template/SQUEEZEBOX.html
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addon_template/SQUEEZEBOX.html?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addon_template/SQUEEZEBOX.html (added)
+++ 7.7/trunk/platforms/readynas/addon_template/SQUEEZEBOX.html Mon Jan 30 09:01:43 2012
@@ -1,0 +1,11 @@
+<!-- User defined content -->
+<table border="0" cellpadding="2" cellspacing="0" width=400>
+ <tr>
+ <td>
+ <span id="PROMPT_SQUEEZEBOX_RUNTIME_SECS" class="field"></span>
+ </td>
+ <td>
+ <input id="SQUEEZEBOX_RUNTIME_SECS" onchange="SQUEEZEBOX_page_change();" onfocus="SQUEEZEBOX_enable_save_button();" type="text">
+ </td>
+ </tr>
+</table>
Added: 7.7/trunk/platforms/readynas/addon_template/SQUEEZEBOX.js
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addon_template/SQUEEZEBOX.js?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addon_template/SQUEEZEBOX.js (added)
+++ 7.7/trunk/platforms/readynas/addon_template/SQUEEZEBOX.js Mon Jan 30 09:01:43 2012
@@ -1,0 +1,258 @@
+self.SQUEEZEBOX_preaction = function()
+{
+}
+
+self.SQUEEZEBOX_onloadaction = function()
+{
+}
+
+self.SQUEEZEBOX_enable = function()
+{
+ document.getElementById('BUTTON_SQUEEZEBOX_APPLY').disabled = false;
+ var runtimeSecs = document.getElementById('SQUEEZEBOX_RUNTIME_SECS');
+ if (runtimeSecs)
+ {
+ runtimeSecs.disabled = false;
+ }
+}
+
+self.SQUEEZEBOX_remove = function()
+{
+ if( !confirm(S['CONFIRM_REMOVE_ADDON']) )
+ {
+ return;
+ }
+
+ var set_url;
+
+ if ( confirm(S['CONFIRM_KEEP_ADDON_DATA']) )
+ {
+ set_url = NasState.otherAddOnHash['SQUEEZEBOX'].DisplayAtom.set_url
+ + '?OPERATION=set&command=RemoveAddOn&data=preserve';
+ }
+ else
+ {
+ set_url = NasState.otherAddOnHash['SQUEEZEBOX'].DisplayAtom.set_url
+ + '?OPERATION=set&command=RemoveAddOn&data=remove';
+ }
+
+ applyChangesAsynch(set_url, SQUEEZEBOX_handle_remove_response);
+}
+
+self.SQUEEZEBOX_handle_remove_response = function()
+{
+ if ( httpAsyncRequestObject &&
+ httpAsyncRequestObject.readyState &&
+ httpAsyncRequestObject.readyState == 4 )
+ {
+ if ( httpAsyncRequestObject.responseText.indexOf('<payload>') != -1 )
+ {
+ showProgressBar('default');
+ xmlPayLoad = httpAsyncRequestObject.responseXML;
+ var status = xmlPayLoad.getElementsByTagName('status').item(0);
+ if (!status || !status.firstChild)
+ {
+ return;
+ }
+
+ if ( status.firstChild.data == 'success')
+ {
+ display_messages(xmlPayLoad);
+ updateAddOn('SQUEEZEBOX');
+ if (!NasState.otherAddOnHash['SQUEEZEBOX'])
+ {
+ remove_element('SQUEEZEBOX');
+ if (getNumAddOns() == 0 )
+ {
+ document.getElementById('no_addons').className = 'visible';
+ }
+ }
+ else
+ {
+ hide_element('SQUEEZEBOX_LINK');
+ }
+ }
+ else if (status.firstChild.data == 'failure')
+ {
+ display_error_messages(xmlPayLoad);
+ }
+ }
+ httpAsyncRequestObject = null;
+ }
+}
+
+self.SQUEEZEBOX_page_change = function()
+{
+ var id_array = new Array( 'SQUEEZEBOX_RUNTIME_SECS' );
+ for (var ix = 0; ix < id_array.length; ix++ )
+ {
+ NasState.otherAddOnHash['SQUEEZEBOX'].DisplayAtom.fieldHash[id_array[ix]].value =
+ document.getElementById(id_array[ix]).value;
+ NasState.otherAddOnHash['SQUEEZEBOX'].DisplayAtom.fieldHash[id_array[ix]].modified = true;
+ }
+}
+
+
+self.SQUEEZEBOX_enable_save_button = function()
+{
+ document.getElementById('BUTTON_SQUEEZEBOX_APPLY').disabled = false;
+}
+
+self.SQUEEZEBOX_apply = function()
+{
+
+ var page_changed = false;
+ var set_url = NasState.otherAddOnHash['SQUEEZEBOX'].DisplayAtom.set_url;
+ var runtimeSecs = document.getElementById('SQUEEZEBOX_RUNTIME_SECS');
+ if (runtimeSecs)
+ {
+ var id_array = new Array ('SQUEEZEBOX_RUNTIME_SECS');
+ for (var ix = 0; ix < id_array.length ; ix ++)
+ {
+ if ( NasState.otherAddOnHash['SQUEEZEBOX'].DisplayAtom.fieldHash[id_array[ix]].modified )
+ {
+ page_changed = true;
+ break;
+ }
+ }
+ }
+ var enabled = document.getElementById('CHECKBOX_SQUEEZEBOX_ENABLED').checked ? 'checked' : 'unchecked';
+ var current_status = NasState.otherAddOnHash['SQUEEZEBOX'].Status;
+ if ( page_changed )
+ {
+ set_url += '?command=ModifyAddOnService&OPERATION=set&' +
+ NasState.otherAddOnHash['SQUEEZEBOX'].DisplayAtom.getApplicablePagePostStringNoQuest('modify') +
+ '&CHECKBOX_SQUEEZEBOX_ENABLED=' + enabled;
+ if ( enabled == 'checked' && current_status == 'on' )
+ {
+ set_url += "&SWITCH=NO";
+ }
+ else
+ {
+ set_url += "&SWITCH=YES";
+ }
+ }
+ else
+ {
+ set_url += '?command=ToggleService&OPERATION=set&CHECKBOX_SQUEEZEBOX_ENABLED=' + enabled;
+ }
+ applyChangesAsynch(set_url, SQUEEZEBOX_handle_apply_response);
+}
+
+self.SQUEEZEBOX_handle_apply_response = function()
+{
+ if ( httpAsyncRequestObject &&
+ httpAsyncRequestObject.readyState &&
+ httpAsyncRequestObject.readyState == 4 )
+ {
+ if ( httpAsyncRequestObject.responseText.indexOf('<payload>') != -1 )
+ {
+ showProgressBar('default');
+ xmlPayLoad = httpAsyncRequestObject.responseXML;
+ var status = xmlPayLoad.getElementsByTagName('status').item(0);
+ if ( !status || !status.firstChild )
+ {
+ return;
+ }
+
+ if ( status.firstChild.data == 'success' )
+ {
+ var log_alert_payload = xmlPayLoad.getElementsByTagName('normal_alerts').item(0);
+ if ( log_alert_payload )
+ {
+ var messages = grabMessagePayLoad(log_alert_payload);
+ if ( messages && messages.length > 0 )
+ {
+ if ( messages != 'NO_ALERTS' )
+ {
+ alert (messages);
+ }
+ var success_message_start = AS['SUCCESS_ADDON_START'];
+ success_message_start = success_message_start.replace('%ADDON_NAME%', NasState.otherAddOnHash['SQUEEZEBOX'].FriendlyName);
+ var success_message_stop = AS['SUCCESS_ADDON_STOP'];
+ success_message_stop = success_message_stop.replace('%ADDON_NAME%', NasState.otherAddOnHash['SQUEEZEBOX'].FriendlyName);
+
+ if ( NasState.otherAddOnHash['SQUEEZEBOX'].Status == 'off' )
+ {
+ NasState.otherAddOnHash['SQUEEZEBOX'].Status = 'on';
+ NasState.otherAddOnHash['SQUEEZEBOX'].RunStatus = 'OK';
+ refresh_applicable_pages();
+ }
+ else
+ {
+ NasState.otherAddOnHash['SQUEEZEBOX'].Status = 'off';
+ NasState.otherAddOnHash['SQUEEZEBOX'].RunStatus = 'not_present';
+ refresh_applicable_pages();
+ }
+ }
+ }
+ }
+ else if (status.firstChild.data == 'failure')
+ {
+ display_error_messages(xmlPayLoad);
+ }
+ }
+ httpAsyncRequestObject = null;
+ }
+}
+
+self.SQUEEZEBOX_handle_apply_toggle_response = function()
+{
+ if (httpAsyncRequestObject &&
+ httpAsyncRequestObject.readyState &&
+ httpAsyncRequestObject.readyState == 4 )
+ {
+ if ( httpAsyncRequestObject.responseText.indexOf('<payload>') != -1 )
+ {
+ showProgressBar('default');
+ xmlPayLoad = httpAsyncRequestObject.responseXML;
+ var status = xmlPayLoad.getElementsByTagName('status').item(0);
+ if (!status || !status.firstChild)
+ {
+ return;
+ }
+ if ( status.firstChild.data == 'success' )
+ {
+ display_messages(xmlPayLoad);
+ }
+ else
+ {
+ display_error_messages(xmlPayLoad);
+ }
+ }
+ }
+}
+
+self.SQUEEZEBOX_service_toggle = function()
+{
+
+ var addon_enabled = document.getElementById('CHECKBOX_SQUEEZEBOX_ENABLED').checked ? 'checked' : 'unchecked';
+ var set_url = NasState.otherAddOnHash['SQUEEZEBOX'].DisplayAtom.set_url
+ + '?OPERATION=set&command=ToggleService&CHECKBOX_SQUEEZEBOX_ENABLED='
+ + addon_enabled;
+
+ var xmlSyncPayLoad = getXmlFromUrl(set_url);
+ var syncStatus = xmlSyncPayLoad.getElementsByTagName('status').item(0);
+ if (!syncStatus || !syncStatus.firstChild)
+ {
+ return ret_val;
+ }
+
+ if ( syncStatus.firstChild.data == 'success' )
+ {
+ display_messages(xmlSyncPayLoad);
+ //if SQUEEZEBOX is enabled
+ NasState.otherAddOnHash['SQUEEZEBOX'].Status = 'on';
+ NasState.otherAddOnHash['SQUEEZEBOX'].RunStatus = 'OK';
+ refresh_applicable_pages();
+ //else if SQUEEZEBOX is disabled
+ NasState.otherAddOnHash['SQUEEZEBOX'].Status = 'off';
+ NasState.otherAddOnHash['SQUEEZEBOX'].RunStatus = 'not_present';
+ refresh_applicable_pages();
+ }
+ else
+ {
+ display_error_messages(xmlSyncPayLoad);
+ }
+}
+
Added: 7.7/trunk/platforms/readynas/addon_template/SQUEEZEBOX.xml
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addon_template/SQUEEZEBOX.xml?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addon_template/SQUEEZEBOX.xml (added)
+++ 7.7/trunk/platforms/readynas/addon_template/SQUEEZEBOX.xml Mon Jan 30 09:01:43 2012
@@ -1,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<addon>
+ <name>SQUEEZEBOX</name>
+ <friendly_name>squeezebox</friendly_name>
+ <version>1.0</version>
+ <detail_url>http://wiki.slimdevices.com</detail_url>
+ <author>Logitech Inc.</author>
+ <get_url>/addons/SQUEEZEBOX_HANDLER.pl</get_url>
+ <set_url>/addons/SQUEEZEBOX_HANDLER.pl</set_url>
+ <preaction>SQUEEZEBOX_preaction</preaction>
+ <onloadaction>SQUEEZEBOX_onloadaction</onloadaction>
+ <current_url>http://downloads.slimdevices.com/lms/logitechmediaserver_latest.xml</current_url>
+ <min_raidiator_version>4.1.3</min_raidiator_version>
+</addon>
+
Added: 7.7/trunk/platforms/readynas/addon_template/SQUEEZEBOX_AVAILABLE.xml
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addon_template/SQUEEZEBOX_AVAILABLE.xml?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addon_template/SQUEEZEBOX_AVAILABLE.xml (added)
+++ 7.7/trunk/platforms/readynas/addon_template/SQUEEZEBOX_AVAILABLE.xml Mon Jan 30 09:01:43 2012
@@ -1,0 +1,15 @@
+<addon>
+ <name>SQUEEZEBOX</name>
+ <friendly_name>squeezebox</friendly_name>
+ <version>1.0</version>
+ <author>Logitech Inc.</author>
+ <description>
+ <en-us>
+ <![CDATA[The Logitech Media Server aka. Squeezebox Server aka. SqueezeCenter aka. SlimServer aka. SliMP3]]>
+ </en-us>
+ </description>
+ <detail_url>http://wiki.slimdevices.com</detail_url>
+ <download_url>http://downloads.slimdevices.com/lms/logitechmediaserver.bin</download_url>
+ <icon>https://mysqueezebox.com/static/images/logitech-logo.png</icon>
+ <min_raidiator_version>4.1.3</min_raidiator_version>
+</addon>
Added: 7.7/trunk/platforms/readynas/addon_template/SQUEEZEBOX_CURRENT.xml
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addon_template/SQUEEZEBOX_CURRENT.xml?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addon_template/SQUEEZEBOX_CURRENT.xml (added)
+++ 7.7/trunk/platforms/readynas/addon_template/SQUEEZEBOX_CURRENT.xml Mon Jan 30 09:01:43 2012
@@ -1,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<addon>
+ <version>1.0</version>
+ <download_url>http://downloads.slimdevices.com/lms/logitechmediaserver.bin</download_url>
+ <message>
+ <en-us>
+ <![CDATA[This is the short message describing the changes made in this release of the add-on.]]>
+ </en-us>
+ </message>
+ <min_raidiator_version>4.1.3</min_raidiator_version>
+</addon>
Added: 7.7/trunk/platforms/readynas/addon_template/SQUEEZEBOX_HANDLER.pl
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addon_template/SQUEEZEBOX_HANDLER.pl?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addon_template/SQUEEZEBOX_HANDLER.pl (added)
+++ 7.7/trunk/platforms/readynas/addon_template/SQUEEZEBOX_HANDLER.pl Mon Jan 30 09:01:43 2012
@@ -1,0 +1,108 @@
+#!/usr/bin/perl
+#-------------------------------------------------------------------------
+# Copyright 2007, NETGEAR
+# All rights reserved.
+#-------------------------------------------------------------------------
+
+do "/frontview/lib/cgi-lib.pl";
+do "/frontview/lib/addon.pl";
+
+# initialize the %in hash
+%in = ();
+ReadParse();
+
+my $operation = $in{OPERATION};
+my $command = $in{command};
+my $enabled = $in{"CHECKBOX_SQUEEZEBOX_ENABLED"};
+my $data = $in{"data"};
+
+get_default_language_strings("SQUEEZEBOX");
+
+my $xml_payload = "Content-type: text/xml; charset=utf-8\n\n"."<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
+
+if( $operation eq "get" )
+{
+ $xml_payload .= Show_SQUEEZEBOX_xml();
+}
+elsif( $operation eq "set" )
+{
+ if( $command eq "RemoveAddOn" )
+ {
+ # Remove_Service_xml() removes this add-on
+ $xml_payload .= Remove_Service_xml("SQUEEZEBOX", $data);
+ }
+ elsif ($command eq "ToggleService")
+ {
+ # Toggle_Service_xml() toggles the enabled state of the add-on
+ $xml_payload .= Toggle_Service_xml("SQUEEZEBOX", $enabled);
+ }
+ elsif ($command eq "ModifyAddOnService")
+ {
+ # Modify_SQUEEZEBOX_xml() processes the input form changes
+ $xml_payload .= Modify_SQUEEZEBOX_xml();
+ }
+}
+
+print $xml_payload;
+
+
+sub Show_SQUEEZEBOX_xml
+{
+ my $xml_payload = "<payload><content>" ;
+
+ # check if service is running or not
+ my $enabled = GetServiceStatus("SQUEEZEBOX");
+
+ # get SQUEEZEBOX_RUNTIME_SECS parameter from /etc/default_services
+ my $run_time = GetValueFromServiceFile("SQUEEZEBOX_RUNTIME_SECS");
+
+ if( $run_time eq "not_found" )
+ {
+ # set run_time to a default value
+ $run_time = "60";
+ }
+
+ my $enabled_disabled = "disabled";
+ $enabled_disabled = "enabled" if( $enabled );
+
+ # return run_time value for HTML
+ $xml_payload .= "<SQUEEZEBOX_RUNTIME_SECS><value>$run_time</value><enable>$enabled_disabled</enable></SQUEEZEBOX_RUNTIME_SECS>";
+
+ $xml_payload .= "</content><warning>No Warnings</warning><error>No Errors</error></payload>";
+
+ return $xml_payload;
+}
+
+
+sub Modify_SQUEEZEBOX_xml
+{
+ my $run_time = $in{"SQUEEZEBOX_RUNTIME_SECS"};
+ my $SPOOL;
+ my $xml_payload;
+
+ $run_time = "60" if( $run_time eq "" );
+
+ $SPOOL .= "
+if grep -q SQUEEZEBOX_RUNTIME_SECS /etc/default/services; then
+ sed -i 's/SQUEEZEBOX_RUNTIME_SECS=.*/SQUEEZEBOX_RUNTIME_SECS=${run_time}/' /etc/default/services
+else
+ echo 'SQUEEZEBOX_RUNTIME_SECS=${run_time}' >> /etc/default/services
+fi
+";
+
+ if( $in{SWITCH} eq "YES" )
+ {
+ $xml_payload = Toggle_Service_xml("SQUEEZEBOX", $enabled);
+ }
+ else
+ {
+ spool_file("${ORDER_SERVICE}_SQUEEZEBOX", $SPOOL);
+ empty_spool();
+
+ $xml_payload = _build_xml_set_payload_sync();
+ }
+ return $xml_payload;
+}
+
+
+1;
Added: 7.7/trunk/platforms/readynas/addon_template/SQUEEZEBOX_service
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addon_template/SQUEEZEBOX_service?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addon_template/SQUEEZEBOX_service (added)
+++ 7.7/trunk/platforms/readynas/addon_template/SQUEEZEBOX_service Mon Jan 30 09:01:43 2012
@@ -1,0 +1,8 @@
+#!/bin/bash
+
+. /etc/default/services
+
+if [ "$SQUEEZEBOX_RUNTIME_SECS" = "" ]; then
+ SQUEEZEBOX_RUNTIME_SECS=60
+fi
+sleep $SQUEEZEBOX_RUNTIME_SECS
Added: 7.7/trunk/platforms/readynas/addon_template/addons.conf
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addon_template/addons.conf?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addon_template/addons.conf (added)
+++ 7.7/trunk/platforms/readynas/addon_template/addons.conf Mon Jan 30 09:01:43 2012
@@ -1,0 +1,1 @@
+SQUEEZEBOX!!squeezebox!!1.0!!/etc/frontview/addons/bin/SQUEEZEBOX/start.sh!!/etc/frontview/addons/bin/SQUEEZEBOX/stop.sh!!Other!!current_url==http://downloads.slimdevices.com/lms/logitechmediaserver_latest.xml::detail_url==http://wiki.slimdevices.com::icon_url==https://mysqueezebox.com/static/images/logitech-logo.png
Added: 7.7/trunk/platforms/readynas/addon_template/install.sh
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addon_template/install.sh?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addon_template/install.sh (added)
+++ 7.7/trunk/platforms/readynas/addon_template/install.sh Mon Jan 30 09:01:43 2012
@@ -1,0 +1,75 @@
+#!/bin/bash
+
+ADDON_HOME=/etc/frontview/addons
+
+bye() {
+ . /frontview/bin/functions
+ cd /
+ rm -rf $orig_dir
+ echo -n ": $1 "
+ log_status "$1" 1
+
+ exit 1
+}
+
+orig_dir=`pwd`
+name=`awk -F'!!' '{ print $1 }' addons.conf`
+stop=`awk -F'!!' '{ print $5 }' addons.conf`
+run=`awk -F'!!' '{ print $4 }' addons.conf`
+version=`awk -F'!!' '{ print $3 }' addons.conf`
+
+if grep -q ${name} $ADDON_HOME/addons.conf; then
+ orig_vers=`awk -F'!!' '/SQUEEZEBOX/ { print $3 }' $ADDON_HOME/addons.conf | cut -f1 -d'.'`
+fi
+
+[ -z "$name" ] && bye "ERROR: No addon name!"
+
+# Remove old versions of our addon
+if [ -f "$ADDON_HOME/${name}.remove" ]; then
+ sh $ADDON_HOME/${name}.remove -upgrade &>/dev/null
+fi
+
+# Extract program files
+cd / || bye "ERROR: Could not change working directory."
+tar --no-overwrite-dir -xzf $orig_dir/files.tgz || bye "ERROR: Could not extract files properly."
+
+# Add ourself to the main addons.conf file
+[ -d $ADDON_HOME ] || mkdir $ADDON_HOME
+chown -R admin.admin $ADDON_HOME
+grep -v ^$name $ADDON_HOME/addons.conf >/tmp/addons.conf$$ 2>/dev/null
+cat $orig_dir/addons.conf >>/tmp/addons.conf$$ || bye "ERROR: Could not include addon configuration."
+cp /tmp/addons.conf$$ $ADDON_HOME/addons.conf || bye "ERROR: Could not update addon configuration."
+rm -f /tmp/addons.conf$$ || bye "ERROR: Could not clean up."
+
+# Copy our removal script to the default directory
+cp $orig_dir/remove.sh $ADDON_HOME/${name}.remove
+
+# Turn ourselves on in the services file
+grep -v ^$name /etc/default/services >/tmp/services$$ || bye "ERROR: Could not back up service configuration."
+echo "${name}_SUPPORT=1" >>/tmp/services$$ || bye "ERROR: Could not add service configuration."
+cp /tmp/services$$ /etc/default/services || bye "ERROR: Could not update service configuration."
+rm -f /tmp/services$$ || bye "ERROR: Could not clean up."
+
+
+########### Addon specific action go here ###########
+
+
+# Set run-time secs to 60 secs. We'll save this in /etc/default/services.
+grep -v SQUEEZEBOX_RUNTIME_SECS /etc/default/services > /tmp/services
+echo "SQUEEZEBOX_RUNTIME_SECS=60" >> /tmp/services
+cp /tmp/services /etc/default/services
+rm -f /tmp/services
+
+
+######################################################
+
+
+eval $run
+
+friendly_name=`awk -F'!!' '{ print $2 }' $orig_dir/addons.conf`
+
+# Remove the installation files
+cd /
+rm -rf $orig_dir
+
+exit 0
Added: 7.7/trunk/platforms/readynas/addon_template/language/de/SQUEEZEBOX.str
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addon_template/language/de/SQUEEZEBOX.str?rev=33776&view=auto
==============================================================================
(empty)
Added: 7.7/trunk/platforms/readynas/addon_template/language/en-us/SQUEEZEBOX.str
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addon_template/language/en-us/SQUEEZEBOX.str?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addon_template/language/en-us/SQUEEZEBOX.str (added)
+++ 7.7/trunk/platforms/readynas/addon_template/language/en-us/SQUEEZEBOX.str Mon Jan 30 09:01:43 2012
@@ -1,0 +1,2 @@
+LABEL_SERVICE_SQUEEZEBOX_INFO::::<b>squeezebox.</b> The Logitech Media Server aka. Squeezebox Server aka. SqueezeCenter aka. SlimServer aka. SliMP3
+PROMPT_SQUEEZEBOX_RUNTIME_SECS::::Run-time (in secs):
Added: 7.7/trunk/platforms/readynas/addon_template/language/fr/SQUEEZEBOX.str
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addon_template/language/fr/SQUEEZEBOX.str?rev=33776&view=auto
==============================================================================
(empty)
Added: 7.7/trunk/platforms/readynas/addon_template/language/ja/SQUEEZEBOX.str
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addon_template/language/ja/SQUEEZEBOX.str?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addon_template/language/ja/SQUEEZEBOX.str (added)
+++ 7.7/trunk/platforms/readynas/addon_template/language/ja/SQUEEZEBOX.str Mon Jan 30 09:01:43 2012
@@ -1,0 +1,2 @@
+LABEL_SERVICE_SQUEEZEBOX_INFO::::<b>squeezebox.</b> The Logitech Media Server aka. Squeezebox Server aka. SqueezeCenter aka. SlimServer aka. SliMP3
+PROMPT_SQUEEZEBOX_RUNTIME_SECS::::å®è¡æé (ç§):
Added: 7.7/trunk/platforms/readynas/addon_template/language/ko/SQUEEZEBOX.str
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addon_template/language/ko/SQUEEZEBOX.str?rev=33776&view=auto
==============================================================================
(empty)
Added: 7.7/trunk/platforms/readynas/addon_template/language/zh-cn/SQUEEZEBOX.str
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addon_template/language/zh-cn/SQUEEZEBOX.str?rev=33776&view=auto
==============================================================================
(empty)
Added: 7.7/trunk/platforms/readynas/addon_template/language/zh-tw/SQUEEZEBOX.str
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addon_template/language/zh-tw/SQUEEZEBOX.str?rev=33776&view=auto
==============================================================================
(empty)
Added: 7.7/trunk/platforms/readynas/addon_template/remove.sh
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addon_template/remove.sh?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addon_template/remove.sh (added)
+++ 7.7/trunk/platforms/readynas/addon_template/remove.sh Mon Jan 30 09:01:43 2012
@@ -1,0 +1,38 @@
+#!/bin/bash
+
+SERVICE=SQUEEZEBOX
+CONF_FILES=""
+PROG_FILES="/etc/frontview/apache/addons/SQUEEZEBOX.conf* \
+ /etc/frontview/addons/*/SQUEEZEBOX"
+
+# Stop service from running
+eval `awk -F'!!' "/^${SERVICE}\!\!/ { print \\$5 }" /etc/frontview/addons/addons.conf`
+
+# Remove program files
+if ! [ "$1" = "-upgrade" ]; then
+ if [ "$CONF_FILES" != "" ]; then
+ for i in $CONF_FILES; do
+ rm -rf $i &>/dev/null
+ done
+ fi
+fi
+
+if [ "$PROG_FILES" != "" ]; then
+ for i in $PROG_FILES; do
+ rm -rf $i
+ done
+fi
+
+# Remove entries from services file
+sed -i "/^${SERVICE}_SUPPORT=/d" /etc/default/services
+
+# Remove entry from addons.conf file
+sed -i "/^${SERVICE}\!\!/d" /etc/frontview/addons/addons.conf
+
+# Reread modified service configuration files
+killall -USR1 apache-ssl
+
+# Now remove ourself
+rm -f $0
+
+exit 0
Added: 7.7/trunk/platforms/readynas/addon_template/running.sh
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addon_template/running.sh?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addon_template/running.sh (added)
+++ 7.7/trunk/platforms/readynas/addon_template/running.sh Mon Jan 30 09:01:43 2012
@@ -1,0 +1,12 @@
+#!/bin/bash
+#
+# This script returns 0 if service is running, 1 otherwise.
+#
+# UNCOMMENT and MODIFY as necessary; return 1 for now.
+#
+
+if ! ps -ef | grep "/etc/frontview/addons/bin/SQUEEZEBOX/SQUEEZEBOX_service" | grep -v grep &> /dev/null; then
+ exit 1
+fi
+
+exit 0
Added: 7.7/trunk/platforms/readynas/addon_template/squeezebox_1.0.bin
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addon_template/squeezebox_1.0.bin?rev=33776&view=auto
==============================================================================
Binary file - no diff available.
Propchange: 7.7/trunk/platforms/readynas/addon_template/squeezebox_1.0.bin
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: 7.7/trunk/platforms/readynas/addon_template/start.sh
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addon_template/start.sh?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addon_template/start.sh (added)
+++ 7.7/trunk/platforms/readynas/addon_template/start.sh Mon Jan 30 09:01:43 2012
@@ -1,0 +1,5 @@
+#!/bin/bash
+#
+# This should contain necessary code to start the service
+
+start-stop-daemon -S -b -m --pidfile /var/run/SQUEEZEBOX.pid -q -x /etc/frontview/addons/bin/SQUEEZEBOX/SQUEEZEBOX_service
Added: 7.7/trunk/platforms/readynas/addon_template/stop.sh
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addon_template/stop.sh?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addon_template/stop.sh (added)
+++ 7.7/trunk/platforms/readynas/addon_template/stop.sh Mon Jan 30 09:01:43 2012
@@ -1,0 +1,5 @@
+#!/bin/bash
+#
+# This should contain necessary code to stop the service
+
+start-stop-daemon --stop --pidfile /var/run/SQUEEZEBOX.pid --signal KILL --quiet
Added: 7.7/trunk/platforms/readynas/addons_sdk/CHANGELOG
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/CHANGELOG?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/CHANGELOG (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/CHANGELOG Mon Jan 30 09:01:43 2012
@@ -1,0 +1,82 @@
+Version: 2.0
+Date: Jan 5, 2011
+
+FrontView Add-on SDK 2.0 introduces a new update framework to add-ons. The new framework
+adds the ability for FrontView to detect if there's a new update for the add-on, get
+info on the new update, and download and install the add-on. In addition, progress of
+the download and installation are displayed.
+
+You will need RAIDiator 4.2.16 or above to utilize the new framework. Any add-on created
+with SDK 2.0 will still work with earlier RAIDiator releases, however new update
+framework will not be exposed. Similarly, add-ons created with pre-SDK 2.0 will still
+show up in 4.2.16 but will not have the update option.
+
+Changes from Version 1.0
+------------------------
+
+(Note: "ADDON" below refers to the add-on name.)
+
+
+1. Added <author> and <current_url> tags to ADDON.xml.
+
+ <author>: Individual or company that created the add-on.
+
+ <current_url>: XML path that describes the latest available add-on. See #2 below.
+
+
+2. ADDON_CURRENT.xml added. This is the XML that is posted at the URL specified in the
+ <current_url> tag of the ADDON.xml.
+
+ <version>: Version of the add-on.
+
+ <detail_url>: URL of an online page describing the add-on in detail.
+
+ <download_url>: Download URL of the add-on. This is used to update the add-on from
+ FrontView.
+
+ <message>: Describes the changes made in this release of the add-on. Note
+ that this tag supports localization. Default English should be
+ enclosed within the <en-us> tag. French should be <fr>, German <de>,
+ Japanese <ja>, etc. Message should be further enclosed in a CDATA
+ tag, i.e.:
+
+ <en-us>
+ <![CDATA[This and that got changed in this add-on.]]>
+ </en-us>
+
+ <min_raidiator_version>: Minimum RAIDiator version required for this add-on, i.e. 4.2.16.
+
+ <reboot_required>: y/n - set to "y" if add-on requires a reboot to take effect.
+
+
+3. ADDON_AVAILABLE.xml added. This is the XML posted by NETGEAR if the add-on will show up
+ in the Add-on Available page. The content will get set automatically after running the
+ "create_addon" script.
+
+ <name>: Name of add-on.
+
+ <friendly_name>: Friendly name of add-on.
+
+ <version>: Version of add-on.
+
+ <author>: Individual or company that created the add-on.
+
+ <description>: Describes the add-on. Note that this tag supports localization.
+ Default English should be enclosed within the <en-us> tag. French
+ should be <fr>, German <de>, Japanese <ja>, etc. Message should be
+ further enclosed in a CDATA tag, i.e.:
+
+ <en-us>
+ <![CDATA[The add-on does a lot of cool stuff.]]>
+ </en-us>
+
+ <detail_url>: URL of an online page describing the add-on in detail.
+
+ <download_url>: Download URL of the add-on. This is used to download the add-on from
+ FrontView when user clicks Install.
+
+ <icon>: URL of icon to display in FrontView.
+
+ <min_raidiator_version>: Minimum RAIDiator version required for this add-on, i.e. 4.2.16.
+
+ <reboot_required>: y/n - set to "y" if add-on requires a reboot to take effect.
Added: 7.7/trunk/platforms/readynas/addons_sdk/CVS/Entries
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/CVS/Entries?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/CVS/Entries (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/CVS/Entries Mon Jan 30 09:01:43 2012
@@ -1,0 +1,5 @@
+/CHANGELOG/1.2/Mon Feb 7 20:20:30 2011//
+/LICENSE/1.2/Fri Dec 3 02:16:39 2010//
+/README/1.3/Mon Feb 28 23:51:36 2011//
+/addon.config/1.1/Mon Feb 28 23:51:36 2011//
+D
Added: 7.7/trunk/platforms/readynas/addons_sdk/CVS/Entries.Log
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/CVS/Entries.Log?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/CVS/Entries.Log (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/CVS/Entries.Log Mon Jan 30 09:01:43 2012
@@ -1,0 +1,2 @@
+A D/bin////
+A D/template////
Added: 7.7/trunk/platforms/readynas/addons_sdk/CVS/Repository
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/CVS/Repository?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/CVS/Repository (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/CVS/Repository Mon Jan 30 09:01:43 2012
@@ -1,0 +1,1 @@
+addons_sdk
Added: 7.7/trunk/platforms/readynas/addons_sdk/CVS/Root
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/CVS/Root?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/CVS/Root (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/CVS/Root Mon Jan 30 09:01:43 2012
@@ -1,0 +1,1 @@
+:pserver:dglover@calzone:/cvs
Added: 7.7/trunk/platforms/readynas/addons_sdk/LICENSE
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/LICENSE?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/LICENSE (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/LICENSE Mon Jan 30 09:01:43 2012
@@ -1,0 +1,22 @@
+The MIT License
+
+Copyright (c) 2010,2011 NETGEAR Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
Added: 7.7/trunk/platforms/readynas/addons_sdk/README
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/README?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/README (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/README Mon Jan 30 09:01:43 2012
@@ -1,0 +1,22 @@
+Frontview Add-on SDK, Version 2.0
+=================================
+
+Welcome to the Frontview Add-on software development kit (SDK) environment. It is recommended that you install this SDK in a shell environment on the ReadyNAS. This README file will explain how you can get started creating a stub add-on for Frontview. For more detailed info on this SDK, please visit the ReadyNAS Developer's Corner on www.readynas.com.
+
+
+To generate an add-on template, from this directory, run:
+
+ # bin/create_addon
+
+You will be asked to enter some basic information about your add-on (e.g. add-on name, description, etc). Alternatively, you can pre-fill the necessary configuration for the add-on in addon.config and run:
+
+ # bin/create_addon addon.config
+
+Once complete, an add-on directory will be created for you with template files for your add-on. If this is your first time, you can proceed with building this add-on as follows:
+
+ # cd <ADDON>
+ # ../bin/build_addon
+
+This will create a <ADDON>.bin file that you can install from Frontview's System->Update->Local tab. Once installed, you'll see the add-on stub in the Services->Installed Add-ons tab.
+
+
Added: 7.7/trunk/platforms/readynas/addons_sdk/addon.config
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/addon.config?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/addon.config (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/addon.config Mon Jan 30 09:01:43 2012
@@ -1,0 +1,47 @@
+# addon.config
+#
+# This is an example of an add-on config file so you can avoid answering the questions each time
+# you recreate an add-on. Replace all the sample fields with your add-on specific info and run:
+#
+# bin/create_addon addon.config
+#
+# Alternatively, copy addon.config to something like MYADDON.config and run:
+#
+# bin/create_addon MYADDON.config
+
+# Enter the name of the add-on
+FRIENDLY_NAME="Cool Addon"
+
+# Enter a description of the add-on. Make sure to escape single and double-quotes with a backslash.
+DESCRIPTION="This is the coolest add-on ever for the ReadyNAS."
+
+# Enter the version of the add-on in the form of 1.2.3 (major.minor.patch) with an optional "-T1" to signify test release.
+VERSION="0.0.1"
+
+# Enter the download path of the add-on. The filename should not contain the version number and the recommended naming
+# is using the add-on's tag name -- all caps with no spaces. Filename should end with a .bin.
+DOWNLOAD_URL="http://www.cooldude.com/download/addons/x86/bins/COOLADDON.bin"
+
+# Enter the xml path that describes the latest add-on available. This file will be automatically created based on your
+# input, but you will want to use the add-on's tag name followed by "_CURRENT.xml".
+CURRENT_URL="http://www.cooldude.com/download/addons/x86/current/COOLADDON_CURRENT.xml"
+
+# Enter a web page where a more detailed description of the add-on is available.
+DETAIL_URL="http://www.cooldude.com/cooladdon"
+
+# Enter a path where the icon image resides. The icon should be 110x110 pixel dimension.
+ICON_URL="http://www.cooldude.com/images/cooladdon.jpg"
+
+# Enter the author of the add-on. This can be a company name.
+AUTHOR="Cool Dude, Inc."
+
+# Enter the minimum RAIDiator version required by the add-on.
+MIN_RAIDIATOR_VERSION="4.2.16"
+
+# Enter (y/n) whether a reboot is required after add-on installation/update for the add-on to take effect. Try your
+# best not to require a reboot.
+REBOOT_REQUIRED="n"
+
+# Enter (y/n) whether Apache needs to be restarted after add-on installation/update for the add-on to take effect. Try
+# your best not to require an Apache restart.
+RESTART_APACHE="n"
Added: 7.7/trunk/platforms/readynas/addons_sdk/bin/CVS/Entries
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/bin/CVS/Entries?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/bin/CVS/Entries (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/bin/CVS/Entries Mon Jan 30 09:01:43 2012
@@ -1,0 +1,6 @@
+/build_addon/1.21/Fri Aug 5 21:38:33 2011//
+/create_addon/1.26/Mon Feb 28 23:51:36 2011//
+/xmlutil.arm/1.1/Fri Aug 5 21:38:33 2011/-kb/
+/xmlutil.nsp/1.1/Sat May 24 02:02:19 2008//
+/xmlutil.x86/1.1/Sat May 24 02:02:19 2008//
+D
Added: 7.7/trunk/platforms/readynas/addons_sdk/bin/CVS/Repository
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/bin/CVS/Repository?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/bin/CVS/Repository (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/bin/CVS/Repository Mon Jan 30 09:01:43 2012
@@ -1,0 +1,1 @@
+addons_sdk/bin
Added: 7.7/trunk/platforms/readynas/addons_sdk/bin/CVS/Root
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/bin/CVS/Root?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/bin/CVS/Root (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/bin/CVS/Root Mon Jan 30 09:01:43 2012
@@ -1,0 +1,1 @@
+:pserver:dglover@calzone:/cvs
Added: 7.7/trunk/platforms/readynas/addons_sdk/bin/build_addon
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/bin/build_addon?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/bin/build_addon (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/bin/build_addon Mon Jan 30 09:01:43 2012
@@ -1,0 +1,113 @@
+#!/bin/bash
+
+error() {
+ echo "ERROR!"
+ exit 1;
+}
+
+if echo ${MACHTYPE} | grep -q sparc; then
+ harch="nsp"
+elif echo ${MACHTYPE} | grep -q i.86; then
+ harch="x86"
+elif echo ${MACHTYPE} | grep -q arm; then
+ harch="arm"
+else
+ echo "Unknown host machine type. This kit will only work on ReadyNAS Padre, x86, and ARM platforms."
+ exit 1
+fi
+
+if [ -z "${TARGET_MACHTYPE+x}" ]; then
+ TARGET_MACHTYPE=${MACHTYPE}
+fi
+
+if echo ${TARGET_MACHTYPE} | grep -q sparc; then
+ arch="nsp"
+ bs=512
+elif echo ${TARGET_MACHTYPE} | grep -q i.86; then
+ arch="x86"
+ bs=16384
+elif echo ${TARGET_MACHTYPE} | grep -q arm; then
+ arch="arm"
+ bs=16384
+else
+ echo "Unknown target machine type. This kit will only build ReadyNAS Padre, x86, and ARM platforms."
+ exit 1
+fi
+if ! [ -d "../bin" -a -d "../template" -a -d "files" ]; then
+ echo "This doesn't appear to be a valid Addon SDK base directory."
+ exit 1
+fi
+
+file=$(ls *.xml | grep -v "_" | head -1)
+TAG=$(../bin/xmlutil.$harch $file /addon/name | awk -F'!!' '{ print $2 }')
+FRIENDLY_NAME=$(../bin/xmlutil.$harch $file /addon/friendly_name | awk -F'!!' '{ print $2 }')
+NAME=$(echo $FRIENDLY_NAME | sed 's/ //g')
+VERS=$(../bin/xmlutil.$harch $file /addon/version | awk -F'!!' '{ print $2 }')
+START=/etc/frontview/addons/bin/$TAG/start.sh
+STOP=/etc/frontview/addons/bin/$TAG/stop.sh
+TIME=$(date +%s)
+
+. .${TAG}_BUILD_SETTINGS
+
+if [ ! -z "${CURRENT_URL}" ]; then
+ if [ ! -z "${ATTRIBUTES}" ]; then
+ ATTRIBUTES="${ATTRIBUTES}::current_url==${CURRENT_URL}";
+ else
+ ATTRIBUTES="current_url==${CURRENT_URL}"
+ fi
+fi
+
+if [ ! -z "${DETAIL_URL}" ]; then
+ if [ ! -z "${ATTRIBUTES}" ]; then
+ ATTRIBUTES="${ATTRIBUTES}::detail_url==${DETAIL_URL}";
+ else
+ ATTRIBUTES="detail_url==${DETAIL_URL}"
+ fi
+fi
+
+if [ ! -z "${ICON_URL}" ]; then
+ if [ ! -z "${ATTRIBUTES}" ]; then
+ ATTRIBUTES="${ATTRIBUTES}::icon_url==${ICON_URL}";
+ else
+ ATTRIBUTES="icon_url==${ICON_URL}"
+ fi
+fi
+
+SKIP_REBOOT=1
+if [ "${REBOOT_REQUIRED}" != "n" ]; then
+ SKIP_REBOOT=0
+fi
+
+if [ "${RESTART_APACHE}" != "n" ]; then
+ RESTART_APACHE=1
+else
+ RESTART_APACHE=0
+fi
+echo "$TAG!!$FRIENDLY_NAME!!$VERS!!$START!!$STOP!!Other!!$ATTRIBUTES" > addons.conf
+
+for file in language/*/*; do
+ cp $file files/etc/frontview/addons/ui/${TAG}/$file
+done
+cp ${TAG}.html ${TAG}.js ${TAG}.xml ${TAG}_HANDLER.pl files/etc/frontview/addons/ui/${TAG}/
+chmod +x files/etc/frontview/addons/ui/${TAG}/${TAG}_HANDLER.pl
+cp start.sh stop.sh running.sh files/etc/frontview/addons/bin/${TAG}/
+(cd files/etc/frontview/addons/bin/${TAG}/; chmod +x start.sh stop.sh running.sh)
+
+if [ -f ${TAG}_service ]; then
+ cp ${TAG}_service files/etc/frontview/addons/bin/${TAG}/
+ chmod +x files/etc/frontview/addons/bin/${TAG}/${TAG}_service
+fi
+
+cp ${TAG}.conf files/etc/frontview/apache/addons/${TAG}.conf
+
+cd files || error
+tar cfz ../files.tgz ./* || error
+cd ..
+tar cf ${NAME}_${VERS}.tar install.sh remove.sh addons.conf files.tgz || error
+
+SIZE=`stat -t ${NAME}_${VERS}.tar | awk '{ print $2 }'`
+MD5=`md5sum ${NAME}_${VERS}.tar | awk '{ print $1 }'`
+echo "addon::name=${FRIENDLY_NAME},version=${VERS},time=${TIME},size=${SIZE},md5sum=${MD5},unencrypted=1,skipreboot=${SKIP_REBOOT},api=1,arch=$arch,min_raidiator_version=${MIN_RAIDIATOR_VERSION},restartapache=${RESTART_APACHE}" | dd conv=sync bs=$bs >index 2>/dev/null || error
+cat index ${NAME}_${VERS}.tar >${NAME}_${VERS}.bin || error
+rm -f index ${NAME}_${VERS}.tar files.tgz
+echo "Successfully built \"$FRIENDLY_NAME\" add-on package as \"${NAME}_${VERS}.bin\"."
Propchange: 7.7/trunk/platforms/readynas/addons_sdk/bin/build_addon
------------------------------------------------------------------------------
svn:executable = *
Added: 7.7/trunk/platforms/readynas/addons_sdk/bin/create_addon
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/bin/create_addon?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/bin/create_addon (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/bin/create_addon Mon Jan 30 09:01:43 2012
@@ -1,0 +1,254 @@
+#!/bin/bash
+
+function addon_wizard {
+ clear
+ echo "Welcome to the Frontview Add-on Wizard"
+
+ while true; do
+ echo
+ read -p "Enter a name for the add-on (please keep it short): " FRIENDLY_NAME
+ TAG_NAME=$(echo $FRIENDLY_NAME | sed 's/ //g')
+ TAG_NAME=$(echo $TAG_NAME | sed 's/[-|\.]/_/g')
+ TAG_NAME=$(echo $TAG_NAME | tr [:lower:] [:upper:])
+ if [ ${#FRIENDLY_NAME} -gt 20 ]; then
+ echo "\"$FRIENDLY_NAME\" looks a little long. Please try to keep the name shorter."
+ continue
+ fi
+ echo -e "\n$TAG_NAME will be used as the tag for the add-on and"
+ echo -e "will be used as the base name for your add-on files.\n\n"
+ read -p "Is this okay? (y/n) " ANS
+ case $ANS in
+ y|Y) break;;
+ *) echo -e "\n"; continue;;
+ esac
+ done
+
+ while true; do
+ echo
+ read -ep "Enter a brief description for \"$FRIENDLY_NAME\" (no single quotes): " DESCRIPTION
+ echo -e "\nDescription will read:"
+ echo -e "$DESCRIPTION\n\n"
+ read -p "Is this okay? (y/n) " ANS
+ case $ANS in
+ y|Y) break;;
+ *) echo -e "\n"; continue;;
+ esac
+ done
+
+ while true; do
+ echo
+ read -p "Enter the version of the add-on [1.0]: " VERSION
+ [ -z "$VERSION" ] && VERSION="1.0"
+ echo -e "\nVersion: $VERSION\n\n"
+ read -p "Is this okay? (y/n) " ANS
+ case $ANS in
+ y|Y) break;;
+ *) echo -e "\n"; continue;;
+ esac
+ done
+
+ while true; do
+ echo
+ read -p "Enter the download URL of the add-on (i.e. http://www.UPDATEME.com/download/${TAG_NAME}.bin) []: " DOWNLOAD_URL
+ [ -z "$DOWNLOAD_URL" ] && DOWNLOAD_URL=""
+ echo -e "\nDownload URL: $DOWNLOAD_URL\n\n"
+ read -p "Is this okay? (y/n) " ANS
+ case $ANS in
+ y|Y) break;;
+ *) echo -e "\n"; continue;;
+ esac
+ done
+
+ while true; do
+ echo
+ read -p "Enter the URL for the XML file describing the currently available add-on (e.g. http://www.UPDATEME.com/download/${TAG_NAME}_CURRENT.xml) []: " CURRENT_URL
+ [ -z "$CURRENT_URL" ] && CURRENT_URL=""
+ echo -e "\nCurrent URL: $CURRENT_URL\n\n"
+ read -p "Is this okay? (y/n) " ANS
+ case $ANS in
+ y|Y) break;;
+ *) echo -e "\n"; continue;;
+ esac
+ done
+
+ while true; do
+ echo
+ read -p "Enter the URL where more detailed information about the add-on can be found []: " DETAIL_URL
+ [ -z "$DETAIL_URL" ] && DETAIL_URL=""
+ echo -e "\nMore Detail URL: $DETAIL_URL\n\n"
+ read -p "Is this okay? (y/n) " ANS
+ case $ANS in
+ y|Y) break;;
+ *) echo -e "\n"; continue;;
+ esac
+ done
+
+ while true; do
+ echo
+ read -p "Enter the icon URL of the add-on (must be https URL) []: " ICON_URL
+ [ -z "$ICON_URL" ] && ICON_URL=""
+ echo -e "\nIcon URL: $ICON_URL\n\n"
+ read -p "Is this okay? (y/n) " ANS
+ case $ANS in
+ y|Y) break;;
+ *) echo -e "\n"; continue;;
+ esac
+ done
+
+ while true; do
+ echo
+ read -p "Enter the author of the add-on []: " AUTHOR
+ [ -z "$AUTHOR" ] && AUTHOR=""
+ echo -e "\nAuthor: $AUTHOR\n\n"
+ read -p "Is this okay? (y/n) " ANS
+ case $ANS in
+ y|Y) break;;
+ *) echo -e "\n"; continue;;
+ esac
+ done
+
+ while true; do
+ echo
+ read -p "Enter the minimum version of RAIDiator firmware required (leave blank if none) []: " MIN_RAIDIATOR_VERSION
+ [ -z "$MIN_RAIDIATOR_VERSION" ] && MIN_RAIDIATOR_VERSION=""
+ echo -e "\nMinimum RAIDiator version required: $MIN_RAIDIATOR_VERSION\n\n"
+ read -p "Is this okay? (y/n) " ANS
+ case $ANS in
+ y|Y) break;;
+ *) echo -e "\n"; continue;;
+ esac
+ done
+
+ while true; do
+ echo
+ read -p "Does the ReadyNAS need to be rebooted after the add-on installation? (y/n) [n]: " REBOOT_REQUIRED
+ [ -z "$REBOOT_REQUIRED" ] && REBOOT_REQUIRED="n"
+ if [ "$REBOOT_REQUIRED" == "y" ] || [ "$REBOOT_REQUIRED" == "Y" ]; then
+ REBOOT_REQUIRED="y"
+ fi
+ echo -e "\nReboot required: $REBOOT_REQUIRED\n\n"
+ read -p "Is this okay? (y/n) " ANS
+ case $ANS in
+ y|Y) break;;
+ *) echo -e "\n"; continue;;
+ esac
+ done
+
+ while true; do
+ echo
+ read -p "Does the web server need to be restarted after the add-on installation? (y/n) [n]: " RESTART_APACHE
+ [ -z "$RESTART_APACHE" ] && RESTART_APACHE="n"
+ if [ "$RESTART_APACHE" == "y" ] || [ "$RESTART_APACHE" == "Y" ]; then
+ RESTART_APACHE="y"
+ fi
+ echo -e "\nRestart web server after installation: $RESTART_APACHE\n\n"
+ read -p "Is this okay? (y/n) " ANS
+ case $ANS in
+ y|Y) break;;
+ *) echo -e "\n"; continue;;
+ esac
+ done
+}
+
+if [ $# -eq 1 ]; then
+ if [ -f $1 ]; then
+ . $1
+ if [ "$FRIENDLY_NAME" == "" ]; then
+ echo "Please enter a non-empty add-on name."
+ exit
+ fi
+ TAG_NAME=$(echo $FRIENDLY_NAME | sed 's/ //g')
+ TAG_NAME=$(echo $TAG_NAME | sed 's/[-|\.]/_/g')
+ TAG_NAME=$(echo $TAG_NAME | tr [:lower:] [:upper:])
+ else
+ echo "$1 does not exist."
+ exit
+ fi
+else
+ addon_wizard
+fi
+
+cat <<END
+If you would like to make changes to your input, please make them in
+${TAG_NAME}.xml. A base source code tree has been generated using the
+information that you provided. You'll find the following files
+
+ ${TAG_NAME}/install.sh
+ ${TAG_NAME}/remove.sh
+ ${TAG_NAME}/start.sh
+ ${TAG_NAME}/stop.sh
+ ${TAG_NAME}/running.sh
+ ${TAG_NAME}/${TAG_NAME}.html
+ ${TAG_NAME}/${TAG_NAME}.js
+ ${TAG_NAME}/${TAG_NAME}.xml
+ ${TAG_NAME}/${TAG_NAME}_AVAILABLE.xml
+ ${TAG_NAME}/${TAG_NAME}_CURRENT.xml
+ ${TAG_NAME}/${TAG_NAME}_HANDLER.pl
+ ${TAG_NAME}/${TAG_NAME}.conf
+ ${TAG_NAME}/language/en-us/${TAG_NAME}.str
+ ${TAG_NAME}/language/de/${TAG_NAME}.str
+ ${TAG_NAME}/language/fr/${TAG_NAME}.str
+ ${TAG_NAME}/language/ja/${TAG_NAME}.str
+ ${TAG_NAME}/language/ko/${TAG_NAME}.str
+ ${TAG_NAME}/language/zh-cn/${TAG_NAME}.str
+ ${TAG_NAME}/language/zh-tw/${TAG_NAME}.str
+
+After you make appropriate changes to the files above, you can build your add-on
+with build_addon. You need to be in the ${TAG_NAME} directory and run ../bin/build_addon.
+
+END
+
+START="/etc/frontview/addons/bin/${TAG_NAME}/start.sh"
+STOP="/etc/frontview/addons/bin/${TAG_NAME}/stop.sh"
+RUNNING="/etc/frontview/addons/bin/${TAG_NAME}/running.sh"
+
+for file in $(cd template; find . -follow -name CVS -prune -o -type f -print); do
+ dir=$(dirname $file)
+ newname=$(basename $file | sed "s/ADDON/$TAG_NAME/")
+ [ -d "${TAG_NAME}/$dir" ] || ( mkdir -p ${TAG_NAME}/$dir; mkdir -p ${TAG_NAME}/files/etc/frontview/addons/ui/${TAG_NAME}/$dir ) || ( echo "Could not make directory $dir" && exit )
+ eval sed 's/%ADDON%/${TAG_NAME}/g' template/$file > ${TAG_NAME}/$dir/$newname
+done
+
+eval sed -i -e \'s#%VERSION%#${VERSION}#g\' \
+ -e \'s#%FRIENDLY_NAME%#${FRIENDLY_NAME}#g\' \
+ -e \'s#%DESCRIPTION%#${DESCRIPTION}#g\' \
+ -e \'s#%DETAIL_URL%#${DETAIL_URL}#g\' \
+ -e \'s#%START%#${START}#g\' \
+ -e \'s#%STOP%#${STOP}#g\' \
+ -e \'s#%RUNNING%#${RUNNING}#g\' \
+ -e \'s#%CURRENT_URL%#${CURRENT_URL}#g\' \
+ -e \'s#%AUTHOR%#${AUTHOR}#g\' \
+ -e \'s#%MIN_RAIDIATOR_VERSION%#${MIN_RAIDIATOR_VERSION}#g\' \
+ ${TAG_NAME}/${TAG_NAME}.xml
+eval sed -i -e \'s#%VERSION%#${VERSION}#g\' \
+ -e \'s#%FRIENDLY_NAME%#${FRIENDLY_NAME}#g\' \
+ -e \'s#%DESCRIPTION%#${DESCRIPTION}#g\' \
+ -e \'s#%DETAIL_URL%#${DETAIL_URL}#g\' \
+ -e \'s#%DOWNLOAD_URL%#${DOWNLOAD_URL}#g\' \
+ -e \'s#%ICON_URL%#${ICON_URL}#g\' \
+ -e \'s#%AUTHOR%#${AUTHOR}#g\' \
+ -e \'s#%MIN_RAIDIATOR_VERSION%#${MIN_RAIDIATOR_VERSION}#g\' \
+ ${TAG_NAME}/${TAG_NAME}_AVAILABLE.xml
+eval sed -i -e \'s#%VERSION%#${VERSION}#g\' \
+ -e \'s#%DOWNLOAD_URL%#${DOWNLOAD_URL}#g\' \
+ -e \'s#%MIN_RAIDIATOR_VERSION%#${MIN_RAIDIATOR_VERSION}#g\' \
+ ${TAG_NAME}/${TAG_NAME}_CURRENT.xml
+
+echo -e "
+DETAIL_URL=${DETAIL_URL}
+CURRENT_URL=${CURRENT_URL}
+ICON_URL=${ICON_URL}
+REBOOT_REQUIRED=${REBOOT_REQUIRED}
+RESTART_APACHE=${RESTART_APACHE}
+MIN_RAIDIATOR_VERSION=${MIN_RAIDIATOR_VERSION}
+" > ${TAG_NAME}/.${TAG_NAME}_BUILD_SETTINGS
+
+for lang in en-us de fr ja ko zh-cn zh-tw; do
+ eval sed -i -e \'s#%DESCRIPTION%#${DESCRIPTION}#g\' \
+ -e \'s#%FRIENDLY_NAME%#${FRIENDLY_NAME}#g\' \
+ ${TAG_NAME}/language/$lang/${TAG_NAME}.str
+done
+
+mkdir -p ${TAG_NAME}/files/etc/frontview/addons/ui/${TAG_NAME} \
+ ${TAG_NAME}/files/etc/frontview/addons/bin/${TAG_NAME} \
+ ${TAG_NAME}/files/etc/frontview/apache/addons
Propchange: 7.7/trunk/platforms/readynas/addons_sdk/bin/create_addon
------------------------------------------------------------------------------
svn:executable = *
Added: 7.7/trunk/platforms/readynas/addons_sdk/bin/xmlutil.arm
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/bin/xmlutil.arm?rev=33776&view=auto
==============================================================================
Binary file - no diff available.
Propchange: 7.7/trunk/platforms/readynas/addons_sdk/bin/xmlutil.arm
------------------------------------------------------------------------------
svn:executable = *
Propchange: 7.7/trunk/platforms/readynas/addons_sdk/bin/xmlutil.arm
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: 7.7/trunk/platforms/readynas/addons_sdk/bin/xmlutil.nsp
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/bin/xmlutil.nsp?rev=33776&view=auto
==============================================================================
Binary file - no diff available.
Propchange: 7.7/trunk/platforms/readynas/addons_sdk/bin/xmlutil.nsp
------------------------------------------------------------------------------
svn:executable = *
Propchange: 7.7/trunk/platforms/readynas/addons_sdk/bin/xmlutil.nsp
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: 7.7/trunk/platforms/readynas/addons_sdk/bin/xmlutil.x86
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/bin/xmlutil.x86?rev=33776&view=auto
==============================================================================
Binary file - no diff available.
Propchange: 7.7/trunk/platforms/readynas/addons_sdk/bin/xmlutil.x86
------------------------------------------------------------------------------
svn:executable = *
Propchange: 7.7/trunk/platforms/readynas/addons_sdk/bin/xmlutil.x86
------------------------------------------------------------------------------
svn:mime-type = application/octet-stream
Added: 7.7/trunk/platforms/readynas/addons_sdk/template/ADDON.conf
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/template/ADDON.conf?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/template/ADDON.conf (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/template/ADDON.conf Mon Jan 30 09:01:43 2012
@@ -1,0 +1,5 @@
+Alias /%ADDON% /etc/frontview/addons/ui/%ADDON%
+<Location /%ADDON%>
+ Options ExecCGI
+ Allow from all
+</Location>
Propchange: 7.7/trunk/platforms/readynas/addons_sdk/template/ADDON.conf
------------------------------------------------------------------------------
svn:executable = *
Added: 7.7/trunk/platforms/readynas/addons_sdk/template/ADDON.html
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/template/ADDON.html?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/template/ADDON.html (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/template/ADDON.html Mon Jan 30 09:01:43 2012
@@ -1,0 +1,11 @@
+<!-- User defined content -->
+<table border="0" cellpadding="2" cellspacing="0" width=400>
+ <tr>
+ <td>
+ <span id="PROMPT_%ADDON%_RUNTIME_SECS" class="field"></span>
+ </td>
+ <td>
+ <input id="%ADDON%_RUNTIME_SECS" onchange="%ADDON%_page_change();" onfocus="%ADDON%_enable_save_button();" type="text">
+ </td>
+ </tr>
+</table>
Propchange: 7.7/trunk/platforms/readynas/addons_sdk/template/ADDON.html
------------------------------------------------------------------------------
svn:executable = *
Added: 7.7/trunk/platforms/readynas/addons_sdk/template/ADDON.js
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/template/ADDON.js?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/template/ADDON.js (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/template/ADDON.js Mon Jan 30 09:01:43 2012
@@ -1,0 +1,258 @@
+self.%ADDON%_preaction = function()
+{
+}
+
+self.%ADDON%_onloadaction = function()
+{
+}
+
+self.%ADDON%_enable = function()
+{
+ document.getElementById('BUTTON_%ADDON%_APPLY').disabled = false;
+ var runtimeSecs = document.getElementById('%ADDON%_RUNTIME_SECS');
+ if (runtimeSecs)
+ {
+ runtimeSecs.disabled = false;
+ }
+}
+
+self.%ADDON%_remove = function()
+{
+ if( !confirm(S['CONFIRM_REMOVE_ADDON']) )
+ {
+ return;
+ }
+
+ var set_url;
+
+ if ( confirm(S['CONFIRM_KEEP_ADDON_DATA']) )
+ {
+ set_url = NasState.otherAddOnHash['%ADDON%'].DisplayAtom.set_url
+ + '?OPERATION=set&command=RemoveAddOn&data=preserve';
+ }
+ else
+ {
+ set_url = NasState.otherAddOnHash['%ADDON%'].DisplayAtom.set_url
+ + '?OPERATION=set&command=RemoveAddOn&data=remove';
+ }
+
+ applyChangesAsynch(set_url, %ADDON%_handle_remove_response);
+}
+
+self.%ADDON%_handle_remove_response = function()
+{
+ if ( httpAsyncRequestObject &&
+ httpAsyncRequestObject.readyState &&
+ httpAsyncRequestObject.readyState == 4 )
+ {
+ if ( httpAsyncRequestObject.responseText.indexOf('<payload>') != -1 )
+ {
+ showProgressBar('default');
+ xmlPayLoad = httpAsyncRequestObject.responseXML;
+ var status = xmlPayLoad.getElementsByTagName('status').item(0);
+ if (!status || !status.firstChild)
+ {
+ return;
+ }
+
+ if ( status.firstChild.data == 'success')
+ {
+ display_messages(xmlPayLoad);
+ updateAddOn('%ADDON%');
+ if (!NasState.otherAddOnHash['%ADDON%'])
+ {
+ remove_element('%ADDON%');
+ if (getNumAddOns() == 0 )
+ {
+ document.getElementById('no_addons').className = 'visible';
+ }
+ }
+ else
+ {
+ hide_element('%ADDON%_LINK');
+ }
+ }
+ else if (status.firstChild.data == 'failure')
+ {
+ display_error_messages(xmlPayLoad);
+ }
+ }
+ httpAsyncRequestObject = null;
+ }
+}
+
+self.%ADDON%_page_change = function()
+{
+ var id_array = new Array( '%ADDON%_RUNTIME_SECS' );
+ for (var ix = 0; ix < id_array.length; ix++ )
+ {
+ NasState.otherAddOnHash['%ADDON%'].DisplayAtom.fieldHash[id_array[ix]].value =
+ document.getElementById(id_array[ix]).value;
+ NasState.otherAddOnHash['%ADDON%'].DisplayAtom.fieldHash[id_array[ix]].modified = true;
+ }
+}
+
+
+self.%ADDON%_enable_save_button = function()
+{
+ document.getElementById('BUTTON_%ADDON%_APPLY').disabled = false;
+}
+
+self.%ADDON%_apply = function()
+{
+
+ var page_changed = false;
+ var set_url = NasState.otherAddOnHash['%ADDON%'].DisplayAtom.set_url;
+ var runtimeSecs = document.getElementById('%ADDON%_RUNTIME_SECS');
+ if (runtimeSecs)
+ {
+ var id_array = new Array ('%ADDON%_RUNTIME_SECS');
+ for (var ix = 0; ix < id_array.length ; ix ++)
+ {
+ if ( NasState.otherAddOnHash['%ADDON%'].DisplayAtom.fieldHash[id_array[ix]].modified )
+ {
+ page_changed = true;
+ break;
+ }
+ }
+ }
+ var enabled = document.getElementById('CHECKBOX_%ADDON%_ENABLED').checked ? 'checked' : 'unchecked';
+ var current_status = NasState.otherAddOnHash['%ADDON%'].Status;
+ if ( page_changed )
+ {
+ set_url += '?command=ModifyAddOnService&OPERATION=set&' +
+ NasState.otherAddOnHash['%ADDON%'].DisplayAtom.getApplicablePagePostStringNoQuest('modify') +
+ '&CHECKBOX_%ADDON%_ENABLED=' + enabled;
+ if ( enabled == 'checked' && current_status == 'on' )
+ {
+ set_url += "&SWITCH=NO";
+ }
+ else
+ {
+ set_url += "&SWITCH=YES";
+ }
+ }
+ else
+ {
+ set_url += '?command=ToggleService&OPERATION=set&CHECKBOX_%ADDON%_ENABLED=' + enabled;
+ }
+ applyChangesAsynch(set_url, %ADDON%_handle_apply_response);
+}
+
+self.%ADDON%_handle_apply_response = function()
+{
+ if ( httpAsyncRequestObject &&
+ httpAsyncRequestObject.readyState &&
+ httpAsyncRequestObject.readyState == 4 )
+ {
+ if ( httpAsyncRequestObject.responseText.indexOf('<payload>') != -1 )
+ {
+ showProgressBar('default');
+ xmlPayLoad = httpAsyncRequestObject.responseXML;
+ var status = xmlPayLoad.getElementsByTagName('status').item(0);
+ if ( !status || !status.firstChild )
+ {
+ return;
+ }
+
+ if ( status.firstChild.data == 'success' )
+ {
+ var log_alert_payload = xmlPayLoad.getElementsByTagName('normal_alerts').item(0);
+ if ( log_alert_payload )
+ {
+ var messages = grabMessagePayLoad(log_alert_payload);
+ if ( messages && messages.length > 0 )
+ {
+ if ( messages != 'NO_ALERTS' )
+ {
+ alert (messages);
+ }
+ var success_message_start = AS['SUCCESS_ADDON_START'];
+ success_message_start = success_message_start.replace('%ADDON_NAME%', NasState.otherAddOnHash['%ADDON%'].FriendlyName);
+ var success_message_stop = AS['SUCCESS_ADDON_STOP'];
+ success_message_stop = success_message_stop.replace('%ADDON_NAME%', NasState.otherAddOnHash['%ADDON%'].FriendlyName);
+
+ if ( NasState.otherAddOnHash['%ADDON%'].Status == 'off' )
+ {
+ NasState.otherAddOnHash['%ADDON%'].Status = 'on';
+ NasState.otherAddOnHash['%ADDON%'].RunStatus = 'OK';
+ refresh_applicable_pages();
+ }
+ else
+ {
+ NasState.otherAddOnHash['%ADDON%'].Status = 'off';
+ NasState.otherAddOnHash['%ADDON%'].RunStatus = 'not_present';
+ refresh_applicable_pages();
+ }
+ }
+ }
+ }
+ else if (status.firstChild.data == 'failure')
+ {
+ display_error_messages(xmlPayLoad);
+ }
+ }
+ httpAsyncRequestObject = null;
+ }
+}
+
+self.%ADDON%_handle_apply_toggle_response = function()
+{
+ if (httpAsyncRequestObject &&
+ httpAsyncRequestObject.readyState &&
+ httpAsyncRequestObject.readyState == 4 )
+ {
+ if ( httpAsyncRequestObject.responseText.indexOf('<payload>') != -1 )
+ {
+ showProgressBar('default');
+ xmlPayLoad = httpAsyncRequestObject.responseXML;
+ var status = xmlPayLoad.getElementsByTagName('status').item(0);
+ if (!status || !status.firstChild)
+ {
+ return;
+ }
+ if ( status.firstChild.data == 'success' )
+ {
+ display_messages(xmlPayLoad);
+ }
+ else
+ {
+ display_error_messages(xmlPayLoad);
+ }
+ }
+ }
+}
+
+self.%ADDON%_service_toggle = function()
+{
+
+ var addon_enabled = document.getElementById('CHECKBOX_%ADDON%_ENABLED').checked ? 'checked' : 'unchecked';
+ var set_url = NasState.otherAddOnHash['%ADDON%'].DisplayAtom.set_url
+ + '?OPERATION=set&command=ToggleService&CHECKBOX_%ADDON%_ENABLED='
+ + addon_enabled;
+
+ var xmlSyncPayLoad = getXmlFromUrl(set_url);
+ var syncStatus = xmlSyncPayLoad.getElementsByTagName('status').item(0);
+ if (!syncStatus || !syncStatus.firstChild)
+ {
+ return ret_val;
+ }
+
+ if ( syncStatus.firstChild.data == 'success' )
+ {
+ display_messages(xmlSyncPayLoad);
+ //if %ADDON% is enabled
+ NasState.otherAddOnHash['%ADDON%'].Status = 'on';
+ NasState.otherAddOnHash['%ADDON%'].RunStatus = 'OK';
+ refresh_applicable_pages();
+ //else if %ADDON% is disabled
+ NasState.otherAddOnHash['%ADDON%'].Status = 'off';
+ NasState.otherAddOnHash['%ADDON%'].RunStatus = 'not_present';
+ refresh_applicable_pages();
+ }
+ else
+ {
+ display_error_messages(xmlSyncPayLoad);
+ }
+}
+
Propchange: 7.7/trunk/platforms/readynas/addons_sdk/template/ADDON.js
------------------------------------------------------------------------------
svn:executable = *
Added: 7.7/trunk/platforms/readynas/addons_sdk/template/ADDON.xml
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/template/ADDON.xml?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/template/ADDON.xml (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/template/ADDON.xml Mon Jan 30 09:01:43 2012
@@ -1,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<addon>
+ <name>%ADDON%</name>
+ <friendly_name>%FRIENDLY_NAME%</friendly_name>
+ <version>%VERSION%</version>
+ <detail_url>%DETAIL_URL%</detail_url>
+ <author>%AUTHOR%</author>
+ <get_url>/addons/%ADDON%_HANDLER.pl</get_url>
+ <set_url>/addons/%ADDON%_HANDLER.pl</set_url>
+ <preaction>%ADDON%_preaction</preaction>
+ <onloadaction>%ADDON%_onloadaction</onloadaction>
+ <current_url>%CURRENT_URL%</current_url>
+ <min_raidiator_version>%MIN_RAIDIATOR_VERSION%</min_raidiator_version>
+</addon>
+
Propchange: 7.7/trunk/platforms/readynas/addons_sdk/template/ADDON.xml
------------------------------------------------------------------------------
svn:executable = *
Added: 7.7/trunk/platforms/readynas/addons_sdk/template/ADDON_AVAILABLE.xml
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/template/ADDON_AVAILABLE.xml?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/template/ADDON_AVAILABLE.xml (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/template/ADDON_AVAILABLE.xml Mon Jan 30 09:01:43 2012
@@ -1,0 +1,15 @@
+<addon>
+ <name>%ADDON%</name>
+ <friendly_name>%FRIENDLY_NAME%</friendly_name>
+ <version>%VERSION%</version>
+ <author>%AUTHOR%</author>
+ <description>
+ <en-us>
+ <![CDATA[%DESCRIPTION%]]>
+ </en-us>
+ </description>
+ <detail_url>%DETAIL_URL%</detail_url>
+ <download_url>%DOWNLOAD_URL%</download_url>
+ <icon>%ICON_URL%</icon>
+ <min_raidiator_version>%MIN_RAIDIATOR_VERSION%</min_raidiator_version>
+</addon>
Propchange: 7.7/trunk/platforms/readynas/addons_sdk/template/ADDON_AVAILABLE.xml
------------------------------------------------------------------------------
svn:executable = *
Added: 7.7/trunk/platforms/readynas/addons_sdk/template/ADDON_CURRENT.xml
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/template/ADDON_CURRENT.xml?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/template/ADDON_CURRENT.xml (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/template/ADDON_CURRENT.xml Mon Jan 30 09:01:43 2012
@@ -1,0 +1,11 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<addon>
+ <version>%VERSION%</version>
+ <download_url>%DOWNLOAD_URL%</download_url>
+ <message>
+ <en-us>
+ <![CDATA[This is the short message describing the changes made in this release of the add-on.]]>
+ </en-us>
+ </message>
+ <min_raidiator_version>%MIN_RAIDIATOR_VERSION%</min_raidiator_version>
+</addon>
Propchange: 7.7/trunk/platforms/readynas/addons_sdk/template/ADDON_CURRENT.xml
------------------------------------------------------------------------------
svn:executable = *
Added: 7.7/trunk/platforms/readynas/addons_sdk/template/ADDON_HANDLER.pl
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/template/ADDON_HANDLER.pl?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/template/ADDON_HANDLER.pl (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/template/ADDON_HANDLER.pl Mon Jan 30 09:01:43 2012
@@ -1,0 +1,108 @@
+#!/usr/bin/perl
+#-------------------------------------------------------------------------
+# Copyright 2007, NETGEAR
+# All rights reserved.
+#-------------------------------------------------------------------------
+
+do "/frontview/lib/cgi-lib.pl";
+do "/frontview/lib/addon.pl";
+
+# initialize the %in hash
+%in = ();
+ReadParse();
+
+my $operation = $in{OPERATION};
+my $command = $in{command};
+my $enabled = $in{"CHECKBOX_%ADDON%_ENABLED"};
+my $data = $in{"data"};
+
+get_default_language_strings("%ADDON%");
+
+my $xml_payload = "Content-type: text/xml; charset=utf-8\n\n"."<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
+
+if( $operation eq "get" )
+{
+ $xml_payload .= Show_%ADDON%_xml();
+}
+elsif( $operation eq "set" )
+{
+ if( $command eq "RemoveAddOn" )
+ {
+ # Remove_Service_xml() removes this add-on
+ $xml_payload .= Remove_Service_xml("%ADDON%", $data);
+ }
+ elsif ($command eq "ToggleService")
+ {
+ # Toggle_Service_xml() toggles the enabled state of the add-on
+ $xml_payload .= Toggle_Service_xml("%ADDON%", $enabled);
+ }
+ elsif ($command eq "ModifyAddOnService")
+ {
+ # Modify_%ADDON%_xml() processes the input form changes
+ $xml_payload .= Modify_%ADDON%_xml();
+ }
+}
+
+print $xml_payload;
+
+
+sub Show_%ADDON%_xml
+{
+ my $xml_payload = "<payload><content>" ;
+
+ # check if service is running or not
+ my $enabled = GetServiceStatus("%ADDON%");
+
+ # get %ADDON%_RUNTIME_SECS parameter from /etc/default_services
+ my $run_time = GetValueFromServiceFile("%ADDON%_RUNTIME_SECS");
+
+ if( $run_time eq "not_found" )
+ {
+ # set run_time to a default value
+ $run_time = "60";
+ }
+
+ my $enabled_disabled = "disabled";
+ $enabled_disabled = "enabled" if( $enabled );
+
+ # return run_time value for HTML
+ $xml_payload .= "<%ADDON%_RUNTIME_SECS><value>$run_time</value><enable>$enabled_disabled</enable></%ADDON%_RUNTIME_SECS>";
+
+ $xml_payload .= "</content><warning>No Warnings</warning><error>No Errors</error></payload>";
+
+ return $xml_payload;
+}
+
+
+sub Modify_%ADDON%_xml
+{
+ my $run_time = $in{"%ADDON%_RUNTIME_SECS"};
+ my $SPOOL;
+ my $xml_payload;
+
+ $run_time = "60" if( $run_time eq "" );
+
+ $SPOOL .= "
+if grep -q %ADDON%_RUNTIME_SECS /etc/default/services; then
+ sed -i 's/%ADDON%_RUNTIME_SECS=.*/%ADDON%_RUNTIME_SECS=${run_time}/' /etc/default/services
+else
+ echo '%ADDON%_RUNTIME_SECS=${run_time}' >> /etc/default/services
+fi
+";
+
+ if( $in{SWITCH} eq "YES" )
+ {
+ $xml_payload = Toggle_Service_xml("%ADDON%", $enabled);
+ }
+ else
+ {
+ spool_file("${ORDER_SERVICE}_%ADDON%", $SPOOL);
+ empty_spool();
+
+ $xml_payload = _build_xml_set_payload_sync();
+ }
+ return $xml_payload;
+}
+
+
+1;
Propchange: 7.7/trunk/platforms/readynas/addons_sdk/template/ADDON_HANDLER.pl
------------------------------------------------------------------------------
svn:executable = *
Added: 7.7/trunk/platforms/readynas/addons_sdk/template/ADDON_service
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/template/ADDON_service?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/template/ADDON_service (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/template/ADDON_service Mon Jan 30 09:01:43 2012
@@ -1,0 +1,8 @@
+#!/bin/bash
+
+. /etc/default/services
+
+if [ "$%ADDON%_RUNTIME_SECS" = "" ]; then
+ %ADDON%_RUNTIME_SECS=60
+fi
+sleep $%ADDON%_RUNTIME_SECS
Propchange: 7.7/trunk/platforms/readynas/addons_sdk/template/ADDON_service
------------------------------------------------------------------------------
svn:executable = *
Added: 7.7/trunk/platforms/readynas/addons_sdk/template/CVS/Entries
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/template/CVS/Entries?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/template/CVS/Entries (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/template/CVS/Entries Mon Jan 30 09:01:43 2012
@@ -1,0 +1,14 @@
+/ADDON.conf/1.1/Sat May 24 02:06:45 2008//
+/ADDON.html/1.10/Sun Jun 15 00:59:04 2008//
+/ADDON.js/1.23/Sat Feb 19 16:15:43 2011//
+/ADDON.xml/1.20/Sat Nov 19 01:14:58 2011//
+/ADDON_AVAILABLE.xml/1.9/Thu Feb 10 23:37:13 2011//
+/ADDON_CURRENT.xml/1.7/Thu Feb 10 23:37:13 2011//
+/ADDON_HANDLER.pl/1.29/Tue Jan 25 02:06:32 2011//
+/ADDON_service/1.3/Sat Jun 14 01:22:53 2008//
+/install.sh/1.12/Tue Apr 26 23:19:01 2011//
+/remove.sh/1.8/Thu Mar 24 17:44:42 2011//
+/running.sh/1.8/Sat Jun 14 01:24:13 2008//
+/start.sh/1.5/Sat Jun 14 01:56:59 2008//
+/stop.sh/1.4/Sat Jun 14 01:56:59 2008//
+D
Added: 7.7/trunk/platforms/readynas/addons_sdk/template/CVS/Entries.Log
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/template/CVS/Entries.Log?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/template/CVS/Entries.Log (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/template/CVS/Entries.Log Mon Jan 30 09:01:43 2012
@@ -1,0 +1,1 @@
+A D/language////
Added: 7.7/trunk/platforms/readynas/addons_sdk/template/CVS/Repository
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/template/CVS/Repository?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/template/CVS/Repository (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/template/CVS/Repository Mon Jan 30 09:01:43 2012
@@ -1,0 +1,1 @@
+addons_sdk/template
Added: 7.7/trunk/platforms/readynas/addons_sdk/template/CVS/Root
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/template/CVS/Root?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/template/CVS/Root (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/template/CVS/Root Mon Jan 30 09:01:43 2012
@@ -1,0 +1,1 @@
+:pserver:dglover@calzone:/cvs
Added: 7.7/trunk/platforms/readynas/addons_sdk/template/install.sh
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/template/install.sh?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/template/install.sh (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/template/install.sh Mon Jan 30 09:01:43 2012
@@ -1,0 +1,75 @@
+#!/bin/bash
+
+ADDON_HOME=/etc/frontview/addons
+
+bye() {
+ . /frontview/bin/functions
+ cd /
+ rm -rf $orig_dir
+ echo -n ": $1 "
+ log_status "$1" 1
+
+ exit 1
+}
+
+orig_dir=`pwd`
+name=`awk -F'!!' '{ print $1 }' addons.conf`
+stop=`awk -F'!!' '{ print $5 }' addons.conf`
+run=`awk -F'!!' '{ print $4 }' addons.conf`
+version=`awk -F'!!' '{ print $3 }' addons.conf`
+
+if grep -q ${name} $ADDON_HOME/addons.conf; then
+ orig_vers=`awk -F'!!' '/%ADDON%/ { print $3 }' $ADDON_HOME/addons.conf | cut -f1 -d'.'`
+fi
+
+[ -z "$name" ] && bye "ERROR: No addon name!"
+
+# Remove old versions of our addon
+if [ -f "$ADDON_HOME/${name}.remove" ]; then
+ sh $ADDON_HOME/${name}.remove -upgrade &>/dev/null
+fi
+
+# Extract program files
+cd / || bye "ERROR: Could not change working directory."
+tar --no-overwrite-dir -xzf $orig_dir/files.tgz || bye "ERROR: Could not extract files properly."
+
+# Add ourself to the main addons.conf file
+[ -d $ADDON_HOME ] || mkdir $ADDON_HOME
+chown -R admin.admin $ADDON_HOME
+grep -v ^$name $ADDON_HOME/addons.conf >/tmp/addons.conf$$ 2>/dev/null
+cat $orig_dir/addons.conf >>/tmp/addons.conf$$ || bye "ERROR: Could not include addon configuration."
+cp /tmp/addons.conf$$ $ADDON_HOME/addons.conf || bye "ERROR: Could not update addon configuration."
+rm -f /tmp/addons.conf$$ || bye "ERROR: Could not clean up."
+
+# Copy our removal script to the default directory
+cp $orig_dir/remove.sh $ADDON_HOME/${name}.remove
+
+# Turn ourselves on in the services file
+grep -v ^$name /etc/default/services >/tmp/services$$ || bye "ERROR: Could not back up service configuration."
+echo "${name}_SUPPORT=1" >>/tmp/services$$ || bye "ERROR: Could not add service configuration."
+cp /tmp/services$$ /etc/default/services || bye "ERROR: Could not update service configuration."
+rm -f /tmp/services$$ || bye "ERROR: Could not clean up."
+
+
+########### Addon specific action go here ###########
+
+
+# Set run-time secs to 60 secs. We'll save this in /etc/default/services.
+grep -v %ADDON%_RUNTIME_SECS /etc/default/services > /tmp/services
+echo "%ADDON%_RUNTIME_SECS=60" >> /tmp/services
+cp /tmp/services /etc/default/services
+rm -f /tmp/services
+
+
+######################################################
+
+
+eval $run
+
+friendly_name=`awk -F'!!' '{ print $2 }' $orig_dir/addons.conf`
+
+# Remove the installation files
+cd /
+rm -rf $orig_dir
+
+exit 0
Propchange: 7.7/trunk/platforms/readynas/addons_sdk/template/install.sh
------------------------------------------------------------------------------
svn:executable = *
Added: 7.7/trunk/platforms/readynas/addons_sdk/template/language/CVS/Entries
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/template/language/CVS/Entries?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/template/language/CVS/Entries (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/template/language/CVS/Entries Mon Jan 30 09:01:43 2012
@@ -1,0 +1,1 @@
+D
Added: 7.7/trunk/platforms/readynas/addons_sdk/template/language/CVS/Entries.Log
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/template/language/CVS/Entries.Log?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/template/language/CVS/Entries.Log (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/template/language/CVS/Entries.Log Mon Jan 30 09:01:43 2012
@@ -1,0 +1,7 @@
+A D/de////
+A D/en-us////
+A D/fr////
+A D/ja////
+A D/ko////
+A D/zh-cn////
+A D/zh-tw////
Added: 7.7/trunk/platforms/readynas/addons_sdk/template/language/CVS/Repository
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/template/language/CVS/Repository?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/template/language/CVS/Repository (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/template/language/CVS/Repository Mon Jan 30 09:01:43 2012
@@ -1,0 +1,1 @@
+addons_sdk/template/language
Added: 7.7/trunk/platforms/readynas/addons_sdk/template/language/CVS/Root
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/template/language/CVS/Root?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/template/language/CVS/Root (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/template/language/CVS/Root Mon Jan 30 09:01:43 2012
@@ -1,0 +1,1 @@
+:pserver:dglover@calzone:/cvs
Added: 7.7/trunk/platforms/readynas/addons_sdk/template/language/de/ADDON.str
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/template/language/de/ADDON.str?rev=33776&view=auto
==============================================================================
(empty)
Added: 7.7/trunk/platforms/readynas/addons_sdk/template/language/de/CVS/Entries
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/template/language/de/CVS/Entries?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/template/language/de/CVS/Entries (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/template/language/de/CVS/Entries Mon Jan 30 09:01:43 2012
@@ -1,0 +1,2 @@
+/ADDON.str/1.3/Sat May 24 01:04:20 2008//
+D
Added: 7.7/trunk/platforms/readynas/addons_sdk/template/language/de/CVS/Repository
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/template/language/de/CVS/Repository?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/template/language/de/CVS/Repository (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/template/language/de/CVS/Repository Mon Jan 30 09:01:43 2012
@@ -1,0 +1,1 @@
+addons_sdk/template/language/de
Added: 7.7/trunk/platforms/readynas/addons_sdk/template/language/de/CVS/Root
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/template/language/de/CVS/Root?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/template/language/de/CVS/Root (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/template/language/de/CVS/Root Mon Jan 30 09:01:43 2012
@@ -1,0 +1,1 @@
+:pserver:dglover@calzone:/cvs
Added: 7.7/trunk/platforms/readynas/addons_sdk/template/language/en-us/ADDON.str
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/template/language/en-us/ADDON.str?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/template/language/en-us/ADDON.str (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/template/language/en-us/ADDON.str Mon Jan 30 09:01:43 2012
@@ -1,0 +1,2 @@
+LABEL_SERVICE_%ADDON%_INFO::::<b>%FRIENDLY_NAME%.</b> %DESCRIPTION%
+PROMPT_%ADDON%_RUNTIME_SECS::::Run-time (in secs):
Added: 7.7/trunk/platforms/readynas/addons_sdk/template/language/en-us/CVS/Entries
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/template/language/en-us/CVS/Entries?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/template/language/en-us/CVS/Entries (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/template/language/en-us/CVS/Entries Mon Jan 30 09:01:43 2012
@@ -1,0 +1,2 @@
+/ADDON.str/1.15/Wed Jun 18 00:50:01 2008//
+D
Added: 7.7/trunk/platforms/readynas/addons_sdk/template/language/en-us/CVS/Repository
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/template/language/en-us/CVS/Repository?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/template/language/en-us/CVS/Repository (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/template/language/en-us/CVS/Repository Mon Jan 30 09:01:43 2012
@@ -1,0 +1,1 @@
+addons_sdk/template/language/en-us
Added: 7.7/trunk/platforms/readynas/addons_sdk/template/language/en-us/CVS/Root
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/template/language/en-us/CVS/Root?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/template/language/en-us/CVS/Root (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/template/language/en-us/CVS/Root Mon Jan 30 09:01:43 2012
@@ -1,0 +1,1 @@
+:pserver:dglover@calzone:/cvs
Added: 7.7/trunk/platforms/readynas/addons_sdk/template/language/fr/ADDON.str
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/template/language/fr/ADDON.str?rev=33776&view=auto
==============================================================================
(empty)
Added: 7.7/trunk/platforms/readynas/addons_sdk/template/language/fr/CVS/Entries
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/template/language/fr/CVS/Entries?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/template/language/fr/CVS/Entries (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/template/language/fr/CVS/Entries Mon Jan 30 09:01:43 2012
@@ -1,0 +1,2 @@
+/ADDON.str/1.3/Sat May 24 01:04:20 2008//
+D
Added: 7.7/trunk/platforms/readynas/addons_sdk/template/language/fr/CVS/Repository
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/template/language/fr/CVS/Repository?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/template/language/fr/CVS/Repository (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/template/language/fr/CVS/Repository Mon Jan 30 09:01:43 2012
@@ -1,0 +1,1 @@
+addons_sdk/template/language/fr
Added: 7.7/trunk/platforms/readynas/addons_sdk/template/language/fr/CVS/Root
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/template/language/fr/CVS/Root?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/template/language/fr/CVS/Root (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/template/language/fr/CVS/Root Mon Jan 30 09:01:43 2012
@@ -1,0 +1,1 @@
+:pserver:dglover@calzone:/cvs
Added: 7.7/trunk/platforms/readynas/addons_sdk/template/language/ja/ADDON.str
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/template/language/ja/ADDON.str?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/template/language/ja/ADDON.str (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/template/language/ja/ADDON.str Mon Jan 30 09:01:43 2012
@@ -1,0 +1,2 @@
+LABEL_SERVICE_%ADDON%_INFO::::<b>%FRIENDLY_NAME%.</b> %DESCRIPTION%
+PROMPT_%ADDON%_RUNTIME_SECS::::å®è¡æé (ç§):
Added: 7.7/trunk/platforms/readynas/addons_sdk/template/language/ja/CVS/Entries
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/template/language/ja/CVS/Entries?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/template/language/ja/CVS/Entries (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/template/language/ja/CVS/Entries Mon Jan 30 09:01:43 2012
@@ -1,0 +1,2 @@
+/ADDON.str/1.6/Wed Jun 18 17:45:30 2008//
+D
Added: 7.7/trunk/platforms/readynas/addons_sdk/template/language/ja/CVS/Repository
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/template/language/ja/CVS/Repository?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/template/language/ja/CVS/Repository (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/template/language/ja/CVS/Repository Mon Jan 30 09:01:43 2012
@@ -1,0 +1,1 @@
+addons_sdk/template/language/ja
Added: 7.7/trunk/platforms/readynas/addons_sdk/template/language/ja/CVS/Root
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/template/language/ja/CVS/Root?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/template/language/ja/CVS/Root (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/template/language/ja/CVS/Root Mon Jan 30 09:01:43 2012
@@ -1,0 +1,1 @@
+:pserver:dglover@calzone:/cvs
Added: 7.7/trunk/platforms/readynas/addons_sdk/template/language/ko/ADDON.str
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/template/language/ko/ADDON.str?rev=33776&view=auto
==============================================================================
(empty)
Added: 7.7/trunk/platforms/readynas/addons_sdk/template/language/ko/CVS/Entries
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/template/language/ko/CVS/Entries?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/template/language/ko/CVS/Entries (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/template/language/ko/CVS/Entries Mon Jan 30 09:01:43 2012
@@ -1,0 +1,2 @@
+/ADDON.str/1.3/Sat May 24 01:04:20 2008//
+D
Added: 7.7/trunk/platforms/readynas/addons_sdk/template/language/ko/CVS/Repository
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/template/language/ko/CVS/Repository?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/template/language/ko/CVS/Repository (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/template/language/ko/CVS/Repository Mon Jan 30 09:01:43 2012
@@ -1,0 +1,1 @@
+addons_sdk/template/language/ko
Added: 7.7/trunk/platforms/readynas/addons_sdk/template/language/ko/CVS/Root
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/template/language/ko/CVS/Root?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/template/language/ko/CVS/Root (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/template/language/ko/CVS/Root Mon Jan 30 09:01:43 2012
@@ -1,0 +1,1 @@
+:pserver:dglover@calzone:/cvs
Added: 7.7/trunk/platforms/readynas/addons_sdk/template/language/zh-cn/ADDON.str
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/template/language/zh-cn/ADDON.str?rev=33776&view=auto
==============================================================================
(empty)
Added: 7.7/trunk/platforms/readynas/addons_sdk/template/language/zh-cn/CVS/Entries
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/template/language/zh-cn/CVS/Entries?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/template/language/zh-cn/CVS/Entries (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/template/language/zh-cn/CVS/Entries Mon Jan 30 09:01:43 2012
@@ -1,0 +1,2 @@
+/ADDON.str/1.3/Sat May 24 01:04:20 2008//
+D
Added: 7.7/trunk/platforms/readynas/addons_sdk/template/language/zh-cn/CVS/Repository
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/template/language/zh-cn/CVS/Repository?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/template/language/zh-cn/CVS/Repository (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/template/language/zh-cn/CVS/Repository Mon Jan 30 09:01:43 2012
@@ -1,0 +1,1 @@
+addons_sdk/template/language/zh-cn
Added: 7.7/trunk/platforms/readynas/addons_sdk/template/language/zh-cn/CVS/Root
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/template/language/zh-cn/CVS/Root?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/template/language/zh-cn/CVS/Root (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/template/language/zh-cn/CVS/Root Mon Jan 30 09:01:43 2012
@@ -1,0 +1,1 @@
+:pserver:dglover@calzone:/cvs
Added: 7.7/trunk/platforms/readynas/addons_sdk/template/language/zh-tw/ADDON.str
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/template/language/zh-tw/ADDON.str?rev=33776&view=auto
==============================================================================
(empty)
Added: 7.7/trunk/platforms/readynas/addons_sdk/template/language/zh-tw/CVS/Entries
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/template/language/zh-tw/CVS/Entries?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/template/language/zh-tw/CVS/Entries (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/template/language/zh-tw/CVS/Entries Mon Jan 30 09:01:43 2012
@@ -1,0 +1,2 @@
+/ADDON.str/1.3/Sat May 24 01:04:20 2008//
+D
Added: 7.7/trunk/platforms/readynas/addons_sdk/template/language/zh-tw/CVS/Repository
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/template/language/zh-tw/CVS/Repository?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/template/language/zh-tw/CVS/Repository (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/template/language/zh-tw/CVS/Repository Mon Jan 30 09:01:43 2012
@@ -1,0 +1,1 @@
+addons_sdk/template/language/zh-tw
Added: 7.7/trunk/platforms/readynas/addons_sdk/template/language/zh-tw/CVS/Root
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/template/language/zh-tw/CVS/Root?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/template/language/zh-tw/CVS/Root (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/template/language/zh-tw/CVS/Root Mon Jan 30 09:01:43 2012
@@ -1,0 +1,1 @@
+:pserver:dglover@calzone:/cvs
Added: 7.7/trunk/platforms/readynas/addons_sdk/template/remove.sh
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/template/remove.sh?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/template/remove.sh (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/template/remove.sh Mon Jan 30 09:01:43 2012
@@ -1,0 +1,38 @@
+#!/bin/bash
+
+SERVICE=%ADDON%
+CONF_FILES=""
+PROG_FILES="/etc/frontview/apache/addons/%ADDON%.conf* \
+ /etc/frontview/addons/*/%ADDON%"
+
+# Stop service from running
+eval `awk -F'!!' "/^${SERVICE}\!\!/ { print \\$5 }" /etc/frontview/addons/addons.conf`
+
+# Remove program files
+if ! [ "$1" = "-upgrade" ]; then
+ if [ "$CONF_FILES" != "" ]; then
+ for i in $CONF_FILES; do
+ rm -rf $i &>/dev/null
+ done
+ fi
+fi
+
+if [ "$PROG_FILES" != "" ]; then
+ for i in $PROG_FILES; do
+ rm -rf $i
+ done
+fi
+
+# Remove entries from services file
+sed -i "/^${SERVICE}_SUPPORT=/d" /etc/default/services
+
+# Remove entry from addons.conf file
+sed -i "/^${SERVICE}\!\!/d" /etc/frontview/addons/addons.conf
+
+# Reread modified service configuration files
+killall -USR1 apache-ssl
+
+# Now remove ourself
+rm -f $0
+
+exit 0
Added: 7.7/trunk/platforms/readynas/addons_sdk/template/running.sh
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/template/running.sh?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/template/running.sh (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/template/running.sh Mon Jan 30 09:01:43 2012
@@ -1,0 +1,12 @@
+#!/bin/bash
+#
+# This script returns 0 if service is running, 1 otherwise.
+#
+# UNCOMMENT and MODIFY as necessary; return 1 for now.
+#
+
+if ! ps -ef | grep "/etc/frontview/addons/bin/%ADDON%/%ADDON%_service" | grep -v grep &> /dev/null; then
+ exit 1
+fi
+
+exit 0
Added: 7.7/trunk/platforms/readynas/addons_sdk/template/start.sh
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/template/start.sh?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/template/start.sh (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/template/start.sh Mon Jan 30 09:01:43 2012
@@ -1,0 +1,5 @@
+#!/bin/bash
+#
+# This should contain necessary code to start the service
+
+start-stop-daemon -S -b -m --pidfile /var/run/%ADDON%.pid -q -x /etc/frontview/addons/bin/%ADDON%/%ADDON%_service
Added: 7.7/trunk/platforms/readynas/addons_sdk/template/stop.sh
URL: http://svn.slimdevices.com/slim/7.7/trunk/platforms/readynas/addons_sdk/template/stop.sh?rev=33776&view=auto
==============================================================================
--- 7.7/trunk/platforms/readynas/addons_sdk/template/stop.sh (added)
+++ 7.7/trunk/platforms/readynas/addons_sdk/template/stop.sh Mon Jan 30 09:01:43 2012
@@ -1,0 +1,5 @@
+#!/bin/bash
+#
+# This should contain necessary code to stop the service
+
+start-stop-daemon --stop --pidfile /var/run/%ADDON%.pid --signal KILL --quiet
_______________________________________________
checkins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/checkins
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.