[csw-users] pkg-get -i pkgutil removed my /opt/csw symlink!!

Maciej Bliziński maciej at opencsw.org
Thu Apr 7 10:15:24 CEST 2011


2011/4/7 Peter Bonivart <bonivart at opencsw.org>:
> On Thu, Apr 7, 2011 at 4:22 AM, Mohamed Lrhazi <lrhazi at gmail.com> wrote:
>> My /opt/csw was a symlink to soem other place (an nfs mount point)...
>> After runinng pkg-get -i pkgutil && pkgrm CSWpkgget
>>
>> It seems I have a brand new, mostly empty, /opt/csw, which is a real
>> dir, not a symlink...
>>
>> Is that expected? maybe I should be reading those prompts that ask if
>> I want stuff done :)
>
> Sorry about that. Pkgadd is a little brutal in these edge cases

Is there a way to make things better in such a case?  For example,
such symlink could be detected in a preinstall script, and a
informative message could be displayed, along the lines of:

"""/opt/csw is a symlink to <place>.  pkgadd will remove the symlink
and replace it with a directory.  There is no easy workaround for
that.  Files from /opt/csw will have to be moved to <place> and the
symlink will have to be re-created by the system administrator (you).

Continuing in 5... 4... 3...
"""

The same test could be done for /opt.

Maciej


More information about the users mailing list