[HPADM] Summary: Relative symlinks in swpackage

From: Peter Oliver (peter.oliver@aquila-networks.co.uk)
Date: Fri Sep 17 2004 - 05:17:33 EDT


I asked:

> Does anyone know if it's possible to create relative symlinks
> in swpackage? I've tried using a relative path in the PSF,
> but I just get an absolute symlink that points to a location
> relative to wherever I happened to run the swpackage command.

Bob Campbell confirmed that it's possible to create such relative
symlinks, pointing out that you can list them with "swlist -file -a type
-a link_source". He also suggested that symlinks could be created by a
control script.

The solution turned out not to lie in the PSF at all, but rather in the
follow_symlinks option to swpackage(1m). You create the symlink on your
filesystem and then package it as a regular file. For instance:

cd /tmp
ln -s relative-symlink-target relative-symlink
swpackage -x follow_symlinks=false -s symlinks.psf

Now, the key part of symlinks.psf is:

        fileset
                tag test
                file -t s /tmp/absolute-symlink-target /tmp/absolute-symlink
                file /tmp/relative-symlink
        end

This gives you a relative symlink
        relative-symlink -> relative-symlink-target
and an absolute symlink
        absolute-symlink -> /tmp/absolute-symlink-target

-- 
Peter Oliver
IS Technical Environment Team
Central Networks
___________________________ Disclaimer Notice ____________________
This message and any attachments are confidential and should only be read by those to whom they are addressed. If you are not the intended recipient, please contact us, delete the message from your computer and destroy any copies. Any distribution or copying without our prior permission is prohibited.
Internet communications are not always secure and therefore the E.ON Group does not accept legal responsibility for this message. The recipient is responsible for verifying its authenticity before acting on the contents. Any views or opinions presented are solely those of the author and do not necessarily represent those of the E.ON Group. 
 
E.ON UK plc, Westwood Way, Westwood Business Park, Coventry, CV4 8LG.
Registered in England & Wales No. 2366970
E.ON UK Trading Ltd, Westwood Way, Westwood Business Park, Coventry, CV4 8LG
Registered in England & Wales No. 4178314
E.ON UK Trading Ltd is regulated by the Financial Services Authority to carry out investment activities. 
Telephone +44 (0) 2476 42 4000
Fax +44 (0) 2476 42 5432
--
             ---> Please post QUESTIONS and SUMMARIES only!! <---
        To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl
       Name: hpux-admin@dutchworks.nl     Owner: owner-hpux-admin@dutchworks.nl
 
 Archives:  ftp.dutchworks.nl:/pub/digests/hpux-admin       (FTP, browse only)
            http://www.dutchworks.nl/htbin/hpsysadmin   (Web, browse & search)


This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 11:02:43 EDT