1833866 Members
2389 Online
110063 Solutions
New Discussion

how to write this .psf

 
Hanry Zhou
Super Advisor

how to write this .psf

I have a fileset associated with a directory and it contains some files, and also some sub-directories, under these sub-directories, there are also some files. I want to swinstall the entire directory to clients from the depot server.

/path/to/thedirectory
files...
/path/to/thedirectory/dir1
files..under dir1
/path/to/thedirectory/dir2
files..under dir2

Based on .psf I created, when I run swremove, only all files under these directories have been removed, and directories themself are not. So, I suspect, I did not write the directives right, following is what I wrote
...
/path/to/thedirectory=/path/to/thedirectory
files * -u 0222 -o root -g sys
...
Thanks,
none
11 REPLIES 11
Hanry Zhou
Super Advisor

Re: how to write this .psf

anybody?
none
Geoff Wild
Honored Contributor

Re: how to write this .psf

Should be like this:

product
tag SYSINFO
title HP System configuration information collector
revision 3.01
fileset
tag sysinfo
directory sysinfo-3.01=/usr/local/sysinfo
file getsn
file sched.models
file sysinfo
file sysinfo.manpage.wri
file sysinfo3.01
file xpinfo
end
end
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Hanry Zhou
Super Advisor

Re: how to write this .psf

Geoff,

Thanks for the message.

How do I define these sub-directories?
In your case, all these files (getsn, sched.models, sysinfo...etc) listed are underneath the directory of sysinfo-3.01.
However, in my case, there are also some sub-directories, and files associated with these sub-directories. What is the appropriate directives to define them.

the problem is when I try to swremove, only all files are removed, no directories have been swremoved. So, I believe the problem is caused by inappropriate directives in .psf file.


Thanks,
none
Geoff Wild
Honored Contributor

Re: how to write this .psf

How about:

file subdir/file1
file subdir/file2
file subdir/file...etc


Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Hanry Zhou
Super Advisor

Re: how to write this .psf

Geoff,

So, if I have multiple files under the sub-directory "dir1", then I have to specifically list each one of them? Like following:

file dir1/file1
file dir1/file2
....

And, do the same to the dir2, dir3, ... and the top directory?

That would be a lot of directives?
none
Geoff Wild
Honored Contributor

Re: how to write this .psf

That is correct - seems like a similiar post you already had:

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=499589

Also, check out this cookbook:

http://aa11.cjb.net/hpux_admin/1999/0024.html

And CREATING YOUR OWN SD-UX DEPOTS :

http://www.hpworks.org.uk/newsletter/articles/depots/


You might be able to do a:

file *
file */*

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Hanry Zhou
Super Advisor

Re: how to write this .psf

Geoff,

the previous thread you indicated is not exactly same question I asked.

If I have to list each one of files under the top directory, and also each one of files under it's sub-directories, that's gonna to be a lot of list of "file ...".
I'm just look for any simple way to do that...


none
Geoff Wild
Honored Contributor

Re: how to write this .psf

Did you try the file * and/or file */*?

That might work...

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Hanry Zhou
Super Advisor

Re: how to write this .psf

I have already tried
file *
and
file */*

none
Geoff Wild
Honored Contributor

Re: how to write this .psf

What about trying David C. Snyder's psf.pl generator?

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Geoff Wild
Honored Contributor

Re: how to write this .psf

Forgot the instructions:

Create a Product Specification File. The HP Manual, Managing HP-UX Software With SD-UX has lots of information on this in Chapter 10. Although there are many fields that you can include, only a few are required. I have a Perl script called "psf" which generates a minimum .psf file given that you follow a few simple rules:

Put all of the files that you want to include under one directory.
Name the directory using the following format: name-major.minor. For example, sed-2.05 or gcc-2.7.2.3.
Run the script from the parent of this directory and give it only a simple directory name(s). For example:

psf sed-2.05 gcc-2.7.2.3 > stuff.psf
If you give it an absolute path name, you will have to manually edit the resulting .psf file to fix the directory mappings.

My script assumes that you want everything to be installed into /usr/local. If you want to change that, you'll have to edit my psf script. It would be easy to make the destination directory a command line argument, but I haven't done so because thus far I'm the only one who uses psf. Just search for "=/usr/local" and change that to whatever you like, "/usr/share/sysadm" for example.

Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.