Bug 12021 - Add customisation for Synology Diskstations
: Add customisation for Synology Diskstations
Status: CLOSED FIXED
Product: Logitech Media Server
Classification: Unclassified
Component: Misc
: 7.4.0
: Other Linux (other)
: -- normal (vote)
: 7.4.0
Assigned To: Michael Herger
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2009-05-11 01:06 UTC by Philippe Kehl
Modified: 2009-10-05 14:34 UTC (History)
1 user (show)

See Also:
Category: ---


Attachments
Customisation module for Synology Diskstations. (5.61 KB, application/octet-stream)
2009-05-11 01:06 UTC, Philippe Kehl
Details
Fix for customisation module for Synology Diskstations (1.02 KB, patch)
2009-07-11 06:50 UTC, Philippe Kehl
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Philippe Kehl 2009-05-11 01:06:17 UTC
Created attachment 5210 [details]
Customisation module for Synology Diskstations.

Hello

Attached a patch that adds customisations for Synology Diskstations.

There are three options to run SC on a Diskstation: SSODS, Optware packages and a Synology package.

The module works for all three.

It changes the name of the OS (displayed in Server Settings -> Information), adds a complete list of files to ignore and adds logRotate().

The ignored items list will be most obvious in the settings wizard where the user now only sees the data partitions on the DS.

I'm not sure if I should add other customisations for paths (scanner, preferences, modules, etc. location). Now this is done via rc scripts and appropriate slimserver.pl command line options in all three solutions. I think that we should rely on this and not customise this in SqueezeCenter.

Any comment on the attached patch is most welcome.

Regards,
flip
Comment 1 Michael Herger 2009-05-11 04:27:43 UTC
Looking good to me - great job!

I noticed you don't do any distinction of the three distributions except for the returned name. Are you using the isSSODS et al. values somewhere in your own code?
Comment 2 Philippe Kehl 2009-05-11 05:21:40 UTC
Thanks.

Yes, in this version there is no distinction but in the osName for the three distributions.

And no, I do not use that anywhere.

In that sense one could just drop the isSSODS, isOptware, isSynology from the osDetails hash.

The isDiskstation key is not used anywhere, too.

If you find it too much code just for displaying the distribution name in the server settings info page, kill the code in Synology::initDetails().
Comment 3 Chris Owens 2009-05-11 09:21:44 UTC
Michael will commit.
Comment 4 Michael Herger 2009-06-08 11:44:22 UTC
change 26946 - thanks flipflip!
Comment 5 Philippe Kehl 2009-07-11 06:49:31 UTC
Hello

A small fix to the previously applied patch is enclosed.

The problem: checking $0 for the path/to/perl is not reliable.

E.g. when calling "./slimserver.pl" $0 will not contain the /path/to/the/particular/perl.

However, @INC would contain the particular /path/to/particular/lib/perl, which in the case here corresponds to the particular perl binaries available on the DS (SSODS, Optware, firmware).

I guess, matching the "@INC" (string context) against the lib path in question is okay and fast.
Comment 6 Philippe Kehl 2009-07-11 06:50:20 UTC
Created attachment 5445 [details]
Fix for customisation module for Synology Diskstations
Comment 7 Michael Herger 2009-07-22 15:35:17 UTC
change 27727 - thanks!
Comment 8 James Richardson 2009-10-05 14:34:17 UTC
This bug has been marked as fixed in the 7.4.0 release version of SqueezeBox Server!
    * SqueezeCenter: 28672
    * Squeezebox 2 and 3: 130
    * Transporter: 80
    * Receiver: 65
    * Boom: 50
    * Controller: 7790
    * Radio: 7790  

Please see the Release Notes for all the details: http://wiki.slimdevices.com/index.php/Release_Notes

If you haven't already, please download and install the new version from http://www.logitechsqueezebox.com/support/download-squeezebox-server.html

If you are still experiencing this problem, feel free to reopen the bug with your new comments and we'll have another look.