HP-UX Reference (11i v3 07/02) - 4 File Formats (vol 8)
s
swpackage(4) swpackage(4)
end # SD
Example File Specifications
The following examples illustrate the use of the
directory and file keywords:
Include all files under
./commands/ , to be rooted under
/usr/sbin/ :
directory ./commands=/usr/sbin
file *
Include only certain files under ./commands/ and
./nls, to be rooted under /usr/sbin/ and
/usr/lib/nls/C/
:
directory ./commands=/usr/sbin
file sbin/swinstall
file sbin/swcopy
...
directory ./nls=/usr/lib/nls/C/
file swinstall.cat
file swremove.cat
...
Explicitly list files and directories, no directory mapping specified:
file ./commands/swinstall /usr/sbin/swinstall
...
file ./nls /usr/lib/nls/C
file ./nls/swinstall.cat /usr/lib/nls/C/swinstall.cat
Use all specification types to include files:
directory ./commands=/usr/sbin
file *
directory ./nls=/usr/lib/nls/C
file swinstall.cat
...
file ./obam/obam.dm /etc/interface.lib/obam/obam.dm
Redefine specific files previously defined using file * (e.g. to set explicit attributes):
directory ./commands=/usr/sbin
file *
file -m 04500 swcommand
file -o adm -g sys swfile
Example Permission Specifications
The following examples illustrate the use of the file_permission keyword.
Set a read only 444 mode for all file objects (requires override for every executable file and directory):
file_permissions -m 444
Set a read mode for non-executable files, and a read/execute mode for executable files and for directories:
file_permissions -u 222
Set the same mode defaults, plus an owner and group:
file_permissions -u 222 -o bin -g bin
Set the same mode defaults, plus a uid and gid:
file_permissions -u 222 -o 2 -g 2
Set the owner write permission in addition to the above:
file_permissions -u 022 -o 2 -g 2
If the user defines no file_permissions, swpackage uses the default value:
file_permissions -u 000
HP-UX 11i Version 3: February 2007 − 25 − Hewlett-Packard Company 465