Tutorial to compile and install Transmission on FFP 0.7-arm
Re: Tutorial to compile and install Transmission on FFP 0.7-
yes, of course.
Here's my output :
root@Silax-Cloud:~# ls -la /ffp/start/transmission.sh
-rwxr-xr-x 1 root root 5.6K Jun 11 10:42 /ffp/start/transmission.sh .
I checked my ffp.log on the location specified by you and i found only one error " can't load library 'libc.so.6' "
Please have a look on my log file https://pastebin.com/8Y07jxSS
Do you think that my problem caused by missing this library ?
Here's my output :
root@Silax-Cloud:~# ls -la /ffp/start/transmission.sh
-rwxr-xr-x 1 root root 5.6K Jun 11 10:42 /ffp/start/transmission.sh .
I checked my ffp.log on the location specified by you and i found only one error " can't load library 'libc.so.6' "
Please have a look on my log file https://pastebin.com/8Y07jxSS
Do you think that my problem caused by missing this library ?
Re: Tutorial to compile and install Transmission on FFP 0.7-
And what you expected with such configuration? You have blocked all control access of transmission daemon service.silax wrote:I start transmission daemon and now i receive the stupid error message
"403: Forbidden
Unauthorized IP Address.
Either disable the IP address whitelist or add your address to it.
If you're editing settings.json, see the 'rpc-whitelist' and 'rpc-whitelist-enabled' entries.
If you're still using ACLs, use a whitelist instead. See the transmission-daemon manpage for details."
I edit the /mnt/HD_a2/ffpdata/transmission/settings.json with the correct item:
"rpc-enabled": false,
"rpc-whitelist": "127.0.0.1",
"rpc-whitelist-enabled": false
Why?
It was clearly stated in upgrade/install post, what you should do, but seems you better know, what you need.
Rerun lddd and paste full outputs of it.I checked my ffp.log on the location specified by you and i found only one error " can't load library 'libc.so.6' "
Well, doing this will allow access to everyone. As long as 9091 port is not exposed to www, it is safe, but it will not restrict access for intruder, if your network is breached. Imo, better approach is to set rpc username, password and limit rpc-whitelist only to local LAN members.modify the rpc-whitelist to a simple "*.*.*.*" (or maybe one * is also good).
For that purpose reload command is implemented, which can save settings, without stopping daemon:make sure, You have stopped the TM before! Otherwise it will overwrite Your modifications from the RAM
Code: Select all
sh /ffp/start/transmission.sh reload
Re: Tutorial to compile and install Transmission on FFP 0.7-
Hi barmalej2,
Thank you for your post. Last night, after I post the message with "403: Forbidden" error I figured how to correctly configure the settings.json file . I managed to upgrade the transmission to 2.92
. Now, the only problem is that the transmission.sh doen't autostart when i power on my NAS .
Outpus for lddd:
Do you know how autostart the transmission.sh .
I granted the right permission: chmod 755 tranmission.sh
What I did wrong ?
Thank you for your post. Last night, after I post the message with "403: Forbidden" error I figured how to correctly configure the settings.json file . I managed to upgrade the transmission to 2.92

Outpus for lddd:
Code: Select all
root@Silax-Cloud:~# cat /tmp/lddd.owRc/missing-libs.txt
/ffp/lib/perl5/5.14.2/arm-linux-thread-multi-64int/auto/DB_File/DB_File.so:
checking sub-depends for 'not found'
libdb-5.2.so => not found (0x00000000)
/ffp/lib/python2.7/site-packages/libxsltmod.so:
checking sub-depends for 'not found'
checking sub-depends for 'not found'
libgcrypt.so.11 => not found (0x00000000)
libgpg-error.so.0 => not found (0x00000000)
/ffp/lib/php/modules/xsl.so:
checking sub-depends for 'not found'
checking sub-depends for 'not found'
libgcrypt.so.11 => not found (0x00000000)
libgpg-error.so.0 => not found (0x00000000)
/ffp/lib/libexslt.so.0.8.15:
checking sub-depends for 'not found'
checking sub-depends for 'not found'
libgcrypt.so.11 => not found (0x00000000)
libgpg-error.so.0 => not found (0x00000000)
/ffp/bin/xsltproc:
libgcrypt.so.11 => not found
libgpg-error.so.0 => not found
libgcrypt.so.11 => not found
libgpg-error.so.0 => not found
I granted the right permission: chmod 755 tranmission.sh
What I did wrong ?
Re: Tutorial to compile and install Transmission on FFP 0.7-
MrDini advise to check ffp boot logs revealed the following problem:
None of the scripts in /ffp/start are able to start, because they has shell interpreter /ffp/bin/sh, which is actually just bourne shell compatibility symlink to /ffp/bin/bash. At that moment bash can't load any script, because of missing library. And here goes the most interesting part-libc.so.6 is a part of glibc, which was never and up till now is not used in ffp Zyxel firmware is based on glibc, while ffp uses uClibc.
This error tends me to think, that something unusual is set in global variables or you have some package badly linked to firmware libc.so.6 instead of ffp uClibc. Also problem can ffp zypkg version specific, as I never saw such problem using ffp-usbstick version. To figure out the key reason can take some time, so be patient.
Required outputs for further investigation:
exec /ffp/etc/rc runs all scripts with execution bit set (minimum 700 is required to run, standardly 755 is used, imo-750 would be the best practice) in the /ffp/start/ directory with start argument. But here is a real problem:exec /ffp/etc/rc
Code: Select all
/usr/local/zy-pkgs/ffproot/ffp/bin/bash: can't load library 'libc.so.6'
This error tends me to think, that something unusual is set in global variables or you have some package badly linked to firmware libc.so.6 instead of ffp uClibc. Also problem can ffp zypkg version specific, as I never saw such problem using ffp-usbstick version. To figure out the key reason can take some time, so be patient.
Required outputs for further investigation:
Code: Select all
env
Code: Select all
readelf -d /ffp/bin/bash | grep NEEDED
Code: Select all
ls -la /ffp/start/
Code: Select all
cat /ffp/etc/rc
Code: Select all
funpkg -q bash
Re: Tutorial to compile and install Transmission on FFP 0.7-
The history repeats itself.
From my understanding it looks like a bug in the zypkg FFp...
Lazy fix (but just after sharing barmalej's commands to see what can cause the problem exactly):
It will create a symlink for the uClibc's libc which isn't the glibc, but works (as Doky told me).
PS to barmalej2: I'm sorry, I didn't read Your whole post. The reload function is such a cool thing!
Will look on the start script, because I am interested in the way how You do that.
From my understanding it looks like a bug in the zypkg FFp...

Lazy fix (but just after sharing barmalej's commands to see what can cause the problem exactly):
Code: Select all
ln -s /ffp/lib/libuClibc-0.9.33.3-git.so /ffp/lib/libc.so.6
PS to barmalej2: I'm sorry, I didn't read Your whole post. The reload function is such a cool thing!

Thanks nas-central the lot of help! 

Re: Tutorial to compile and install Transmission on FFP 0.7-
We have no evidence right now to say like that. It is just a guess.MrDini wrote:From my understanding it looks like a bug in the zypkg FFp...
It is very dirty hack and even if it works at glance, I would strongly recommend do not use it. After applying it, tracing primary problem might be impossible. Besides, building or compiling source on such system can be unpredictable.MrDini wrote:Lazy fix (but just after sharing barmalej's commands to see what can cause the problem exactly):
It will create a symlink for the uClibc's libc which isn't the glibc, but works (as Doky told me).Code: Select all
ln -s /ffp/lib/libuClibc-0.9.33.3-git.so /ffp/lib/libc.so.6
P.S. @MrDini. Both users experiencing the same problem are Romanian? It that coincidence?
Re: Tutorial to compile and install Transmission on FFP 0.7-
Hello guys,
Thank you very much for your analyzing. In this moment, I have the feeling that this update is causing too many problems.
Do you have the same feeling ?
Barmalej2, In the below you will find all the results:
Sorry for the long post.
Any suggestion/improvements are welcome
Thank you very much for your analyzing. In this moment, I have the feeling that this update is causing too many problems.
Do you have the same feeling ?
Barmalej2, In the below you will find all the results:
Code: Select all
root@Silax-Cloud:~# exec /ffp/etc/rc
* /ffp/start/transmission.sh ...
Starting transmission...done! [ OK ]
* /ffp/start/SERVERS.sh inactive
* /ffp/start/portmap.sh inactive
* /ffp/start/nfsd.sh inactive
* /ffp/start/LOGIN.sh inactive
* /ffp/start/telnetd.sh inactive
* /ffp/start/sshd.sh ...
Starting sshd...[ Fail!!! ] ERROR WARNING: sshd can not start!!!
* /ffp/start/serviio.sh inactive
* /ffp/start/rsyncd.sh inactive
* /ffp/start/phpfpm.sh inactive
* /ffp/start/phpcgi.sh inactive
* /ffp/start/mysqld.sh inactive
* /ffp/start/kickangel.sh inactive
* /ffp/start/kickwebs.sh inactive
* /ffp/start/lighttpd.sh inactive
* /ffp/start/inetd.sh inactive
* /ffp/start/darkstat.sh inactive
Code: Select all
root@Silax-Cloud:~# env
TERM=xterm
SHELL=/ffp/bin/sh
SSH_CLIENT=192.168.1.97 50969 22
SSH_TTY=/dev/pts/0
USER=root
MAIL=/var/mail/root
PATH=/ffp/opt/java/jre/bin:/ffp/opt/java/jre/bin:/ffp/opt/java/jre/bin:/ffp/sbin:/usr/sbin:/sbin:/ffp/bin:/usr/bin:/bin
INPUTRC=/ffp/etc/inputrc
PWD=/root
LANG=en_US
PS1=\u@\h:\w\$
PS2=>
SHLVL=1
HOME=/root
LESS=-M
LOGNAME=root
SSH_CONNECTION=192.168.1.97 50969 192.168.1.102 22
_=/ffp/bin/env
Code: Select all
root@Silax-Cloud:~# readelf -d /ffp/bin/bash | grep NEEDED
0x00000001 (NEEDED) Shared library: [libncursesw.so.5]
0x00000001 (NEEDED) Shared library: [libiconv.so.2]
0x00000001 (NEEDED) Shared library: [libdl.so.0]
0x00000001 (NEEDED) Shared library: [libc.so.0]
Code: Select all
root@Silax-Cloud:~# ls -la /ffp/start/
total 140K
drwxr-xr-x 2 root root 4.0K Jun 13 20:38 .
drwxr-xr-x 17 root root 4.0K Jun 12 18:34 ..
-rw-r--r-- 1 root root 52 Jan 13 2012 LOGIN.sh
-rw-r--r-- 1 root root 35 Jan 13 2012 SERVERS.sh
-rw-r--r-- 1 root root 1.3K Mar 5 2013 darkstat.sh
-rw-r--r-- 1 root root 87 Apr 18 2014 darkstat.sh.new
-rw-r--r-- 1 root root 203 Jan 21 2012 inetd.sh
-rw-r--r-- 1 root root 906 Dec 12 2012 kickangel.sh
-rw-r--r-- 1 root root 229 Dec 29 2011 kickwebs.sh
-rw-r--r-- 1 root root 286 Dec 12 2012 kickwebs.sh.new
-rw-r--r-- 1 root root 223 Dec 29 2011 lighttpd.sh
-rw-r--r-- 1 root root 1.9K Dec 12 2012 lighttpd.sh.new
-rw-r--r-- 1 root root 956 Oct 29 2012 mysqld.sh
-rw-r--r-- 1 root root 1.6K Dec 28 2011 nfsd.sh
-rw-r--r-- 1 root root 608 Dec 31 2013 phpcgi.sh
-rw-r--r-- 1 root root 609 Oct 23 2014 phpfpm.sh
-rw-r--r-- 1 root root 160 Dec 30 2011 portmap.sh
-rw-r--r-- 1 root root 4.1K Nov 19 2016 rsyncd.sh
-rw-r--r-- 1 root root 1.2K Dec 18 2011 rsyncd.sh.old20170612_183503
-rw-r--r-- 1 root root 6.3K Jan 20 2016 serviio.sh
-rwxr-xr-x 1 root root 6.3K Jan 20 2016 serviio.sh_off
-rwxr-xr-x 1 root root 4.7K Sep 7 2015 sshd.sh
-rw-r--r-- 1 root root 1.1K Nov 24 2013 sshd.sh.old20170612_183426
-rw-r--r-- 1 root root 169 Jan 21 2012 telnetd.sh
-rwxr-xr-x 1 root root 5.6K Jun 11 10:42 transmission.sh
-rw-r--r-- 1 root root 811 Mar 10 2016 transmission.sh.old20170612_183515
-rw-r--r-- 1 root root 5.6K Jun 13 18:45 transmission.sh.old20170613_190435
-rw-r--r-- 1 root root 5.6K Jun 13 18:45 transmission.sh.old20170613_203806
Code: Select all
root@Silax-Cloud:~# cat /ffp/etc/rc
#!/ffp/bin/sh
export PATH=/ffp/sbin:/ffp/bin:/usr/sbin:/sbin:/usr/bin:/bin
# We don't need LD_LIBRARY_PATH for funplug packages, and we
# don't like surprises here (CH3SNAS firmware 1.03, see
# http://forum.dsmg600.info/p13433-Yesterday-18%3A53%3A36.html#p13433 ).
unset LD_LIBRARY_PATH
# reverse order of elements in a list
reverse_list()
{
_list=
while [ $# -gt 0 ]; do
_list="$1 $_list"
shift
done
echo $_list
}
files=$(rcorder /ffp/start/*.sh)
case "$1" in
stop)
for f in $(reverse_list $files); do
if [ -x "$f" ]; then
$f stop
fi
done
;;
*)
for f in $files; do
if [ -x "$f" ]; then
echo "* $f ..."
$f start
else
echo "* $f inactive"
fi
done
;;
esac
Code: Select all
root@Silax-Cloud:~# funpkg -q bash
bash-4.3.42-arm-1
Any suggestion/improvements are welcome

Re: Tutorial to compile and install Transmission on FFP 0.7-
Outputs are typical and I see nothing suspicious in them.
The problem is pretty much clear. In case of ffp-zypkg, /ffp/bin/bash uClibc runtime loader/linker /ffp/lib/ld-uClibc.so.0 loads some sub-dependent library of bash not from /ffp/lib/ directory, but from zyxel firmware /usr/lib. All libs in /usr/lib are glibc based. The interesting part is that it fails to load /lib/libc.so.6.
Problem occurs only on boot time and can't be reproduced from command line after boot.
As I am not expert of ffp-zypkg (actually I never used it), so my only guess now is that some of ffp-zypkg boot environment variables makes ffp runtime loader/linker - /ffp/lib/ld-uClibc.so.0 to search for libs, where it shouldn't look for. There is several ways to resolve this problem. Imo, most suitable one is to rebuilt uClibc with hardcoded rpath-/ffp/lib. I will prepare the new build on weekend. Meanwhile you can try the following command:Reboot and check logs again. Worth to check, even if there is a little chance.
I already told you to disable ffp sshd autostart, because you are using zyxel sshd:Starting sshd...[ Fail!!! ] ERROR WARNING: sshd can not start!!!
Code: Select all
chmod 644 /ffp/start/sshd.sh
Problem occurs only on boot time and can't be reproduced from command line after boot.
As I am not expert of ffp-zypkg (actually I never used it), so my only guess now is that some of ffp-zypkg boot environment variables makes ffp runtime loader/linker - /ffp/lib/ld-uClibc.so.0 to search for libs, where it shouldn't look for. There is several ways to resolve this problem. Imo, most suitable one is to rebuilt uClibc with hardcoded rpath-/ffp/lib. I will prepare the new build on weekend. Meanwhile you can try the following command:
Code: Select all
ldconfig
Re: Tutorial to compile and install Transmission on FFP 0.7-
Lets try new uClibc build with hardcoded libraries runtime search path:
Check logs for bash errors.
Does transmission starts now after reboot?
Code: Select all
cd /ffp/funpkg/cache/br2
wget -nv http://downloads.zyxel.nas-central.org/Users/barmalej2/ffp/0.7/arm/packages/testing/uClibc-0.9.33.3_git-arm-9.txz
wget -nv http://downloads.zyxel.nas-central.org/Users/barmalej2/ffp/0.7/arm/packages/testing/uClibc-solibs-0.9.33.3_git-arm-9.txz
funpkg -u uClibc-0.9.33.3_git-arm-9.txz uClibc-solibs-0.9.33.3_git-arm-9.txz
reboot
Does transmission starts now after reboot?
Re: Tutorial to compile and install Transmission on FFP 0.7-
Hello guys!
Last weekend I factory reset my NAS and I installed again ffp using Mijzelf method . After that, I installed Transmission 2.92 using the guide wrote from barmalej2, page 12 on this topic. After the last installation I have a issue with ffp 0.7 . Seams that library ld-linux.so.3 can't loading. The ffp trace have the next error:
I run lddd app to know what librarians I missing
http://s.go.ro/jvywuow2
http://s.go.ro/ruaadql2
Do you know who to fix this issue?
Last weekend I factory reset my NAS and I installed again ffp using Mijzelf method . After that, I installed Transmission 2.92 using the guide wrote from barmalej2, page 12 on this topic. After the last installation I have a issue with ffp 0.7 . Seams that library ld-linux.so.3 can't loading. The ffp trace have the next error:
Code: Select all
Rotating logfiles...
rm /i-data/md0/admin/zy-pkgs/ffp/ffp.log.9.gz
mv /i-data/md0/admin/zy-pkgs/ffp/ffp.log.8.gz /i-data/md0/admin/zy-pkgs/ffp/ffp.log.9.gz
mv /i-data/md0/admin/zy-pkgs/ffp/ffp.log.7.gz /i-data/md0/admin/zy-pkgs/ffp/ffp.log.8.gz
mv /i-data/md0/admin/zy-pkgs/ffp/ffp.log.6.gz /i-data/md0/admin/zy-pkgs/ffp/ffp.log.7.gz
mv /i-data/md0/admin/zy-pkgs/ffp/ffp.log.5.gz /i-data/md0/admin/zy-pkgs/ffp/ffp.log.6.gz
mv /i-data/md0/admin/zy-pkgs/ffp/ffp.log.4.gz /i-data/md0/admin/zy-pkgs/ffp/ffp.log.5.gz
mv /i-data/md0/admin/zy-pkgs/ffp/ffp.log.3.gz /i-data/md0/admin/zy-pkgs/ffp/ffp.log.4.gz
mv /i-data/md0/admin/zy-pkgs/ffp/ffp.log.2.gz /i-data/md0/admin/zy-pkgs/ffp/ffp.log.3.gz
mv /i-data/md0/admin/zy-pkgs/ffp/ffp.log.1.gz /i-data/md0/admin/zy-pkgs/ffp/ffp.log.2.gz
cat /i-data/md0/admin/zy-pkgs/ffp/ffp.log | gzip -c >/i-data/md0/admin/zy-pkgs/ffp/ffp.log.1.gz
Try to determine NAS type...
according to /zyxel/mnt/info/modelid: AE03->NSA325v2
type NSA325v2, fw V4.81(AALS.0)
Starting /usr/local/zy-pkgs/ffproot/after_booting.sh version 20131124 at Mon Aug 7 05:15:21 UTC 2017...
Try to create a /ffp symlink...done
To chroot or not to chroot...FFP 0.7/arm, no
Change root shell
Change admin shell
Generate helper file 1 /tmp/.ffpstick/helper.inc...done
Generate helper file 2 /tmp/.ffpstick/helper.inc...done
Generate convenience symlink /mnt/HD_a2
exec /ffp/etc/rc
/usr/local/zy-pkgs/ffproot/ffp/bin/bash: can't load library 'ld-linux.so.3'
http://s.go.ro/jvywuow2
http://s.go.ro/ruaadql2
Do you know who to fix this issue?
Re: Tutorial to compile and install Transmission on FFP 0.7-
Try to upgrade uClibc and uClibc-solibs packages. Instructions are in the post right above yours.
Re: Tutorial to compile and install Transmission on FFP 0.7-
I have the same problem after I upgraded uClibc and uClibc-solibs packages .
Re: Tutorial to compile and install Transmission on FFP 0.7-
After vacations, I found some free time to take a closer look at this problem. It turns out to be generic ffp bug no matter of ffp type used: ffp-zypkg (ZyXel package installed on harddisk) or ffp-stick (USB). I injected some code into ffp after_booting.sh script right before line to check several environment variables. Here is output:
I wasn't able to reproduce this problem, because I never used and haven't installed ZyXel packages. Mine /usr/local/zy-pkgs/lib directory is almost empty, while your's /usr/local/zy-pkgs/lib has libraries used by installed your ZyXel packages. In your case, there is collision is between glibc (ZyXel firmware) and uClibc (ffp) libraries, because some of the bash dependent libs are tried to load from /usr/local/zy-pkgs/lib and the other part from /ffp/lib.
From my point of view cleanest solution would be to unset LD_LIBRARY_PATH in ffp environment initialize script-after_booting.sh. Since it doesn't depend on us, I solved that in other way. It is not perfect one solution, but should also solve your problem. I uploaded new bash ffp package into br2 repository with hardcoded libraries search path-/ffp/lib into bash binary, so you can update it:
Then reboot box and check ffp logs again.
Some ZyXel specific observation.
Mystic remains, why ZyXel firmware busybox shell-/bin/sh used by after_booting.sh script sources /etc/profile file, while it shouldn't do that, when running as non-login shell. It violates standard shell, posix compliant? rules.
Code: Select all
exec /ffp/etc/rc
LD_LIBRARY_PATH is real evil here and actual culprit of this problem. It should be unset before initialization of ffp environment and running any ffp program including /ffp/etc/rc script. /ffp/etc/rc basically unsets LD_LIBRARY_PATH variable on first step, but the script itself is initialized by /ffp/bin/bash interpreter, which in turn depends on these libraries:LD_LIBRARY_PATH is : /usr/local/zy-pkgs/lib
PATH is : /bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:/zyxel/sbin:/usr/local/zy-pkgs/bin:/zyxel/htp
exec /ffp/etc/rc
Code: Select all
readelf -d /ffp/bin/bash | grep NEEDED
LD_LIBRARY_PATH is set to /usr/local/zy-pkgs/lib, thus it forces to search and load bash dependent libs libncursesw.so.5 libiconv.so.2 libdl.so.0 and libc.so.0 in ZyXel firmware libraries directory-/usr/local/zy-pkgs/lib first instead of standard ffp libraries place-/ffp/lib. It's very bad, because none of ffp programs or libs should never use, depend and load ZyXel firmware libraries, based on glibc.0x00000001 (NEEDED) Shared library: [libncursesw.so.5]
0x00000001 (NEEDED) Shared library: [libiconv.so.2]
0x00000001 (NEEDED) Shared library: [libdl.so.0]
0x00000001 (NEEDED) Shared library: [libc.so.0]
I wasn't able to reproduce this problem, because I never used and haven't installed ZyXel packages. Mine /usr/local/zy-pkgs/lib directory is almost empty, while your's /usr/local/zy-pkgs/lib has libraries used by installed your ZyXel packages. In your case, there is collision is between glibc (ZyXel firmware) and uClibc (ffp) libraries, because some of the bash dependent libs are tried to load from /usr/local/zy-pkgs/lib and the other part from /ffp/lib.
From my point of view cleanest solution would be to unset LD_LIBRARY_PATH in ffp environment initialize script-after_booting.sh. Since it doesn't depend on us, I solved that in other way. It is not perfect one solution, but should also solve your problem. I uploaded new bash ffp package into br2 repository with hardcoded libraries search path-/ffp/lib into bash binary, so you can update it:
Code: Select all
slapt-get -u
slapt-get -i bash
Some ZyXel specific observation.
Mystic remains, why ZyXel firmware busybox shell-/bin/sh used by after_booting.sh script sources /etc/profile file, while it shouldn't do that, when running as non-login shell. It violates standard shell, posix compliant? rules.
Re: Tutorial to compile and install Transmission on FFP 0.7-
Wow Sherlock, good stuff!
When booting the kernel executes /init, which executes /linuxrc, which is a symlink to busybox. The linuxrc applet does 'init', and reads /etc/inittab, which states it should execute /etc/init.d/rcS.
/etc/init.d/rcS mounts or generates&mount /zyxel/mnt/sysdisk/sysdisk.img, which contains a script <mountpoint>/etc/init.d/rcS2. In it's last line /etc/init.d/rcS executes <mountpoint>/etc/init.d/rcS2.
<mountpoint>/etc/init.d/rcS2 (/ram_bin/etc/rcS2) starts withThis script also starts all firmware daemons, and starts the FFP stick, and so they all inherit this environment.
It doesn't.Mystic remains, why ZyXel firmware busybox shell-/bin/sh used by after_booting.sh script sources /etc/profile file, while it shouldn't do that, when running as non-login shell.
When booting the kernel executes /init, which executes /linuxrc, which is a symlink to busybox. The linuxrc applet does 'init', and reads /etc/inittab, which states it should execute /etc/init.d/rcS.
/etc/init.d/rcS mounts or generates&mount /zyxel/mnt/sysdisk/sysdisk.img, which contains a script <mountpoint>/etc/init.d/rcS2. In it's last line /etc/init.d/rcS executes <mountpoint>/etc/init.d/rcS2.
<mountpoint>/etc/init.d/rcS2 (/ram_bin/etc/rcS2) starts with
Code: Select all
#!/bin/sh
# NOTE:
# This script initializes almost all system services on HDD.
. /etc/profile
Re: Tutorial to compile and install Transmission on FFP 0.7-
Thanks Watson for valuable notes about Zyxel booting process
I was too lazy to track down from where the /etc/profile comes from.
Do we really need LD_LIBRARY_PATH=/usr/local/zy-pkgs/lib in after_booting.sh? I am asking about this, because hardcoding libs search path for ffp bash might be not enough. I think, that RPATH has precedence over LD_LIBRARY_PATH only for direct dependencies. For indirect ones (dependencies of direct dependent libs) LD_LIBRARY_PATH has higher value thus it is still searched first.

Do we really need LD_LIBRARY_PATH=/usr/local/zy-pkgs/lib in after_booting.sh? I am asking about this, because hardcoding libs search path for ffp bash might be not enough. I think, that RPATH has precedence over LD_LIBRARY_PATH only for direct dependencies. For indirect ones (dependencies of direct dependent libs) LD_LIBRARY_PATH has higher value thus it is still searched first.