OS2 World Community Forum

OS/2, eCS & ArcaOS - Technical => Applications => Topic started by: Rick Smith on January 19, 2021, 08:43:41 pm

Title: Symlink?
Post by: Rick Smith on January 19, 2021, 08:43:41 pm
Greetings,

I apologize I’ve been asking a lot of questions lately, I really do try and seek out information on my own! So in arca can I create symlinks? The reason I ask, is for instance I installed openssh and it installed in mptn/etc/ssh but when you go to use it it’s looking in etc/ssh? So in order to get it to work one must copy everything over to etc/ssh? I guess I have two questions, the symlink and why do things install that way? I must just be missing the logic behind that, but it’s been 20 or so years since I had any os2 chops!

Thanks fo your input

Rick
Title: Re: Symlink?
Post by: Dave Yeo on January 19, 2021, 09:57:47 pm
A couple of things. OS/2 uses %ETC% to put the stuff that goes in /etc in *nix systems, our TCP/IP stack for example is a BSD port. %ETC% usually points to x:\mptn\etc (x:\tcpip\etc on Warp v3).
So a good port will use %ETC%, but in the interests of saving time by porters, newer ports often use @unixroot/etc. So we have 2 etc directories.
There are a couple of ways to reconcile these.
ArcaOS ships with the klibC Path Remapper, it is found in System Setup and allows replacing/extending paths, I've never quite got the hang of it but if you look /etc is mapped to %ETC%.
There's also symlinks, these act much like *nix symlinks, at that a symlink on a HPFS partition will work on Linux and vice a versa. These only work at the libc level, so basically anything compiled with GCC (not the old EMX GCC) will see these symlinks, which are kept as an Extended Attribute. You use them with the same tools as on Linux, ln -s for example.
There's also has been file systems that support symlinks, the old ext2 port even supported hard links IIRC, as well as symlinks. Unluckily it is not compatible with LVM.
There's also the TVFS (Toronto Virtual File System) on Hobbes which also allows real symlinks and a virtual drive letter. I used to have everything linked to X:
Really, today the choices are the path remapper or symlinks, or just using the correct etc. The documentation will hopefully tell you.
Note that doing a make install on a Unix port will often install with symlinks.
Title: Re: Symlink?
Post by: Rick Smith on January 20, 2021, 05:26:47 am
Greetings,

Thank you for your help... I couldn't get the symlink or the mapper working.. So I reluctantly relocated the files so that sshd would start... However I noticed something very strange when connecting to arca via ssh from my Debian machine.  Backspace,del and the arrow keys do not function as they should?  Anyone out there know of a fix for this?

Regards,

Rick
Title: Re: Symlink?
Post by: Paul Smedley on January 20, 2021, 05:50:08 am
Which port of openssh? If it's an old EMX one, it won't recognise symlinks...
Title: Re: Symlink?
Post by: Rick Smith on January 20, 2021, 08:45:00 am
Which port of openssh? If it's an old EMX one, it won't recognise symlinks...

I was using the one from altsan but I could not get ssh-agent working I wold get "could not open a connection to your authentication agent" when doing ssh-add so I upgraded to the newer version on yum... somehow its slightly worse now tho.. now if I run ssh-agent I get..
"unix_listener: cannot bind to path C:\\var\\temp/ssh-9aNvELjeTVIE/agent.99: Too many open files in system" I have been working several hours trying to cure this so if anyone has run into this and knows how to solve Id love to hear from you...

Rick