Talk:Llink:synology: Difference between revisions

From Lundman Wiki
No edit summary
No edit summary
Line 58: Line 58:


After some more Googling and poking in the Synology forum and wiki, I might have found a way?
After some more Googling and poking in the Synology forum and wiki, I might have found a way?
 
Copy the start file to the autostart directory with prefix of the startup shellscript, "S99":
Copy the start file to the autostart directory
(But what is the prefix of the startup shellscript, "S99" ?)


<code>
<code>
cp /volume1/llink/llink-1.9.5/etc/init.d/llink[???] /usr/syno/etc/rc.d/[S99?]llink.sh
cp /volume1/llink/llink-1.9.5/etc/init.d/llink[???] /usr/syno/etc/rc.d/S99llink.sh
</code>
</code>



Revision as of 22:18, 5 January 2008

Installation pre-requisites

When I ran llink on my CS-406 I did have some optware installed already; the bootstrap and toolchain from NSLU2-linux,org and the SSODS3 packages (which include the ELDK). Perhaps it influenced the successful installation? Maybe more things are needed apart from the telnet/SSH-patch currently listed?
/ dc11ab 00:09, 5 January 2008 (JST)

Slimserver/SqueezeCenter hickup's

On a Synology NAS with SSODS Slimserver installation there are unhandled http header requests from cookies seen in the llink log: I have not idea if this something worth looking into or not.

[request] is listening
[request] New request from 192.168.1.2:64543
[request] >> 'GET / HTTP/1.1'
[request] clearnode
keepalive
[request] GET for '/' ('')
[request] >> 'Host: 192.168.1.5:8888'
[request] >> 'User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en; rv:1.8.1.11) Gecko/20071128 Camino/1.5.4'
[request] >> 'Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5'
[request] >> 'Accept-Language: en-US,en;q=0.9,sv;q=0.9,ja;q=0.8,fr;q=0.8,de;q=0.7,es;q=0.6,it;q=0.6,nl;q=0.5,nb;q=0.4,da;q=0.4,fi;q=0.3,pt;q=0.3,zh-Hans;q=0.2,zh-Hant;q=0.1,ko;q=0.1'
[request] Unhandled HTTP header 'Accept-Language:' with 'en-US,en;q=0.9,sv;q=0.9,ja;q=0.8,fr;q=0.8,de;q=0.7,es;q=0.6,it;q=0.6,nl;q=0.5,nb;q=0.4,da;q=0.4,fi;q=0.3,pt;q=0.3,zh-Hans;q=0.2,zh-Hant;q=0.1,ko;q=0.1'
[request] >> 'Accept-Encoding: gzip,deflate'
[request] Unhandled HTTP header 'Accept-Encoding:' with 'gzip,deflate'
[request] >> 'Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7'
[request] Unhandled HTTP header 'Accept-Charset:' with 'ISO-8859-1,utf-8;q=0.7,*;q=0.7'
[request] >> 'Keep-Alive: 300'
[request] Unhandled HTTP header 'Keep-Alive:' with '300'
[request] >> 'Connection: keep-alive'
[request] connection type: 1
[request] >> 'Cookie: SqueezeCenter-player=00%3A04%3A20%3A06%3Af8%3Ae5; SqueezeCenter-expandPlayerControl=true; SqueezeCenter-expanded-MY_MUSIC=0; SqueezeCenter-expanded-RADIO=0; SqueezeCenter-expanded-MUSIC_SERVICES=0; SqueezeCenter-expanded-FAVORITES=0; SqueezeCenter-expanded-PLUGINS=0'
[request] Unhandled HTTP header 'Cookie:' with 'SqueezeCenter-player=00%3A04%3A20%3A06%3Af8%3Ae5; SqueezeCenter-expandPlayerControl=true; SqueezeCenter-expanded-MY_MUSIC=0; SqueezeCenter-expanded-RADIO=0; SqueezeCenter-expanded-MUSIC_SERVICES=0; SqueezeCenter-expanded-FAVORITES=0; SqueezeCenter-expanded-PLUGINS=0'
[request] >> ''
[request] actioning request for /
[request] disabling socket input for duration of process
[request] tmpname '/tmp/.llink.G69xU6'
[request] tmpfile closed
[request] reopening tmpfile
[request] actioning request for /
[request] disabling socket input for duration of process
[request] sending file
[request] sending reply code 200:OK

Found the following ports used by the SqueezeCenter7

  • 3483 UDP/TCP (used by Squeezbox player for streaming traffic??))
  • 9000 TCP (Server web interface)
  • 9090 TCP (CLI)

I guess the ports have nothing to do with it., but I'm stuck at this,.
/ dc11ab 00:11, 5 January 2008 (JST)

Autostart

I'm not sure where to start and what to do in order to get llink autostart on boot. After poking around I decided to post some rc-files that might make some sense for someone who knows *nix better than me. Sorry for spamming.

/ dc11ab 21:37, 5 January 2008 (JST)


After some more Googling and poking in the Synology forum and wiki, I might have found a way? Copy the start file to the autostart directory with prefix of the startup shellscript, "S99":

cp /volume1/llink/llink-1.9.5/etc/init.d/llink[???] /usr/syno/etc/rc.d/S99llink.sh

Secondly we need to update the /etc/rc so that we include the needed libraries, inserting this string at the end of the file: (but what is the local library path? I just made this up!)

export LD_LIBRARY_PATH=/volume1/llink/local/lib

With this fixed, the Synology NAS should start llink upon reboot.

Perhaps I need to modify some PATH in /root/.bashrc, .bash_profile and .profile too?


In the /etc/services I don't see any reference to SSODS or Slimserver - third party software that I know auto start.


So, first off, the /etc/defaults/rc.conf

CubeStation> cat defaults/rc.conf
#!/bin/sh

# System setting
local_startup="/etc/rc.d /usr/syno/etc/rc.d /usr/local/etc/rc.d"

# Network
defaultrouter=""
network_interfaces="lo"
ifconfig_lo="inet 127.0.0.1"
hostname=""

# Now start up miscellaneous daemons that don't belong anywhere else
inetd_enable="Yes"
inetd_program="/usr/sbin/inetd"
inetd_flags=""
crond_enable="YES"
crond_program="/usr/sbin/crond"
crond_flags=""
syslogd_enable="YES"
syslogd_program="/sbin/syslogd"
syslogd_flags=""

OK, so I looked into the /usr/syno/etc.defaults/rc.d directory:

CubeStation> ls /usr/syno/etc.defaults/rc.d 
S02hotplugd.sh      S10UPnPportmap.sh   S66synoindexd.sh    S81atalk.sh         S88synomkflvd.sh    S98findhostd.sh
S03bootup.sh        S20pgsql.sh         S77synomkthumbd.sh  S831234.sh          S95sshd.sh          S99ftpd.sh
S03inetd.sh         S21mysql.sh         S78JumboFrame.sh    S84rsyncd.sh        S96synorcd.sh       S99iTunes.sh
S04crond.sh         S25download.sh      S79RCPower.sh       S85synonetbkpd.sh   S97apache-sys.sh    S99zbootok.sh
S09DDNS.sh          S55lpd.sh           S80samba.sh         S86synodms.sh       S97apache-user.sh

There are some startup scripts, but no sign of SSODS or Slimserver.

Moving on, here's the long /etc/rc

It's copywrited by Synology Inc. and not under GNU. Is it really OK to post it?

Anyway, it looks untouched. No sign of SSODS or Slimserver.

But the /etc/rc.local shows the SSODS/Slimserver!

CubeStation> cat rc.local
/volume1/SSODS/etc/init.d/rc.ssods # SSODS3 (keep the tag)

And the /volume1/SSODS/etc/intit.d/rc.ssoods looks like this:

CubeStation> cat /volume1/SSODS/etc/init.d/rc.ssods
#!/volume1/SSODS/bin/bash
#
# $Id: rc.ssods,v 1.4 2007/10/03 22:27:17 flip Exp flip $
#
# this script runs the scripts ${SSODSDIR}/etc/init.d/{S,K}??*
# in (alpha)numerical order
#
# Copyright (c) 2006, 2007 Philippe Kehl <flipflip at gmx dot net>
#
# This program is free software; you can redistribute it and/or modify it under
# the terms of the GNU General Public License version 2 as published by the
# Free Software Foundation.
#
# See the documentation for details and copying conditions.
#

# get site config
source /volume1/SSODS/etc/ssods/ssods.conf || exit 1
PATH=${SSODSDIR}/sbin:${PATH}
export PATH

RCSSODS=yes

# start or stop?
case "$1" in

    stop)
        cmd=stop
        key=K
        ;;
    start|*)
        cmd=start
        key=S
        ;;
esac

for S in ${SSODSDIR}/etc/init.d/${key}*; do

    # ignore broken symlinks
    [ ! -f ${S} ] && continue

    echo "*** ${S} ${cmd} ***"
    # source (!) script
    source $S ${cmd}

done

# eof