Hi!
Playing around with the "Install to File System" feature lately, I noticed a problem if loading an extension containing a startup-script that symlinks or copies files from /tmp/tcloop/... to some place in the filesystem in RAM.
F.e.:
- "Default Install to File System Flag" is set (i.e. /etc/sysconfig/tcedir/copy2fs.flg exists).
- foobar.tcz is in the OnDemand list.
- foobar.tcz contains /usr/local/tce.installed/foobar
#!/bin/sh
ln -s /tmp/tcloop/foobar/usr/local/foobar/foobar /usr/local/bin/
- /usr/local/bin/foobar will be a dead symlink since /tmp/tcloop/ is empty.
- Running foobar will create an infinite loop, as the only valid command found in $PATH will be
/etc/sysconfig/tcedir/ondemand/foobar , which will call itself again and again.
At least pppd.tcz and perl5.tcz make use of the /tmp/tcloop directory in their startup-scripts.
I experienced the infinite loop using my personal firefox.tcz that is using a startup-script from an older version from the official repo.
Changing the script to the following still works fine for me if NOT using copy2fs.flg .
#!/bin/sh
ln -s /usr/local/foobar/foobar /usr/local/bin/
(Works fine too if I DO use copy2fs.flg .)
Also, plain cp will not copy symlinks but the actual files they point to.
Question:
Is there any downside in omitting /tmp/tcloop/foobar in the startup-script?
If not so, I (or someone who speaks proper english) may add this info to the
startup-script section of the wiki
("Don't use /tmp/tcloop in your startup-script as this directory doesn't necessarily contain any files!").
Cheers.