Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
WD MyCloud and Minimserver
07-02-2018, 16:40
Post: #51
RE: WD MyCloud and Minimserver
(04-02-2018 22:18)simoncn Wrote:  ...

Please try removing the PATH line and creating a minimstart.conf file as described in this post (using the correct path to the java executable on your system). If you do this together with the S99 change, does this enable MinimServer to start automatically?

Hmm.. no, that appears not to work (but I can test something else, if you can figure it out)

MyBookLive:~# ls -tral /shares/Public/Minim/minimserver/etc/minimstart.conf <-- check I made it right...
-rw-rw-rw- 1 root root 47 Feb 7 13:40 /shares/Public/Minim/minimserver/etc/minimstart.conf
MyBookLive:~# tail -100 /shares/Public/Minim/minimserver/etc/minimstart.conf <--- list the contents...
JAVA=/shares/Public/Java/ejre1.7.0_75/bin/java
MyBookLive:~# ls /shares/Public/Java/ejre1.7.0_75/bin/java
/shares/Public/Java/ejre1.7.0_75/bin/java <-- yes, this is where java is.
MyBookLive:~# ls -tral /shares/Public/Minim/minimserver/data/minimserver-out.log
-rw-rw-rw- 1 root root 79 Feb 7 15:08 /shares/Public/Minim/minimserver/data/minimserver-out.log
MyBookLive:~# tail -100 /shares/Public/Minim/minimserver/data/minimserver-out.log <-- log contents after reboot. (minim not started.)
/shares/Public/Minim/minimserver/bin/startd: line 125: java: command not found
MyBookLive:~# /etc/rc2.d/S99minimserver start <--- yep. That still works in the shell environment...
MyBookLive:~# which java <-- check where java really is...
/usr/local/bin/java
MyBookLive:~# ls -tral /usr/local/bin/java
lrwxrwxrwx 1 root root 41 Jan 31 11:45 /usr/local/bin/java -> /shares/Public/Java/ejre1.7.0_75/bin/java
MyBookLive:~#
Find all posts by this user
Quote this message in a reply
07-02-2018, 18:33
Post: #52
RE: WD MyCloud and Minimserver
Your minimstart.conf file should contain java= (lower case), not JAVA=.
Find all posts by this user
Quote this message in a reply
07-02-2018, 19:17
Post: #53
RE: WD MyCloud and Minimserver
(07-02-2018 18:33)simoncn Wrote:  Your minimstart.conf file should contain java= (lower case), not JAVA=.

Ah yes - that helps. It works now.

Let me know if you want me to try out the out-of-the-box installation.

Also, I found http://manpages.ubuntu.com/manpages/prec...c.d.8.html which helps explain how to customize the init process, and seems like a safe (but complex!) way to set things up - mybooklive has this update-cr.d command and the .legacy-bootordering is an empty file. There is no insserv command.

Hope that helps more than it confuses...
Find all posts by this user
Quote this message in a reply
07-02-2018, 19:56
Post: #54
RE: WD MyCloud and Minimserver
Thanks for confirming this. The only other difference is the S99 change. This appears to default to S01 if NN is not specified as an argument to update-rc.d, which would cause MinimServer to be started earlier in the boot process than with S99. Some descriptions of update-rc.d don't mention the NN argument, so I am not sure whether I can rely on this working for all platforms. If you could try "out of the box" (which I presume would use S01), I would appreciate it.

I am not familiar with either .legacy-bootordering or insserv. MinimServer doesn't use either of these.
Find all posts by this user
Quote this message in a reply
08-02-2018, 12:28
Post: #55
RE: WD MyCloud and Minimserver
(07-02-2018 19:56)simoncn Wrote:  Thanks for confirming this. The only other difference is the S99 change. This appears to default to S01 if NN is not specified as an argument to update-rc.d, which would cause MinimServer to be started earlier in the boot process than with S99. Some descriptions of update-rc.d don't mention the NN argument, so I am not sure whether I can rely on this working for all platforms. If you could try "out of the box" (which I presume would use S01), I would appreciate it.

I am not familiar with either .legacy-bootordering or insserv. MinimServer doesn't use either of these.


To try and unravel the update-rc.d knot a little, I tried the following:

MyBookLive:~# update-rc.d -n minimserver defaults
Adding system startup for /etc/init.d/minimserver ...
/etc/rc0.d/K20minimserver -> ../init.d/minimserver
/etc/rc1.d/K20minimserver -> ../init.d/minimserver
/etc/rc6.d/K20minimserver -> ../init.d/minimserver
/etc/rc2.d/S20minimserver -> ../init.d/minimserver
/etc/rc3.d/S20minimserver -> ../init.d/minimserver
/etc/rc4.d/S20minimserver -> ../init.d/minimserver
/etc/rc5.d/S20minimserver -> ../init.d/minimserver


The default priority of 20 is obviously arbitrary, and anyway not appropriate for the corresponding shutdown stages (the K's - which should be at 100-the S's priority), but this result describes which rcN.d links are created. Note that the -n option is for 'don't actually do anything'

Instead, I tweaked the command and tested out the following:

MyBookLive:~# update-rc.d minimserver start 85 2 3 4 5 . stop 15 0 1 6 .
Adding system startup for /etc/init.d/minimserver ...
/etc/rc0.d/K15minimserver -> ../init.d/minimserver
/etc/rc1.d/K15minimserver -> ../init.d/minimserver
/etc/rc6.d/K15minimserver -> ../init.d/minimserver
/etc/rc2.d/S85minimserver -> ../init.d/minimserver
/etc/rc3.d/S85minimserver -> ../init.d/minimserver
/etc/rc4.d/S85minimserver -> ../init.d/minimserver
/etc/rc5.d/S85minimserver -> ../init.d/minimserver


Priority 85 is what is used by another (ahem) media server on my installation.

This can't be a global (all unixes) solution, since - as described here - BSD distributions don't have the rcN.d directories, and some other Linux's have them, but not the update-rc.d command. Could you test for the presence of the command?
Find all posts by this user
Quote this message in a reply
09-02-2018, 15:36
Post: #56
RE: WD MyCloud and Minimserver
This command (specifying SS=85 and KK=15) is working for you because the WD MyCloud has a /etc/init.d/.legacy-bootordering file. I tried the same command on a Debian system that uses dependency-based boot sequencing and it created all the links as S01 and K01. With dependency-based boot sequencing, it isn't possible to specify absolute SS and KK numbers but it is possible to specify $all in the service file to force the service to start last and stop first (presumably suitable for MinimServer).

So a possible approach would be:

Code:
if update-rc.d exists then
    if .legacy-bootordering exists then
        use update-rc.d to create start links as 99 and stop links as 01
    else
        use update-rc.d with $all in the service file
    fi
fi

There is already some special code for certain systems without update-rc.d and I don't propose to change this at present because of the risk of breaking things.
Find all posts by this user
Quote this message in a reply
Yesterday, 23:27
Post: #57
RE: WD MyCloud and Minimserver
I have made this change in a test build. Please check your PMs for details of how to download the test build. Many thanks!
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)