[rock-devel] RFC: postinstall scripts
Clifford Wolf
clifford at clifford.at
Thu Apr 14 21:15:43 CEST 2005
Hi,
I can't find the proposal on the list - so here it is (again, or the first
time - I'm not sure... ;-)
Whenever 'mine' runs, it writes a logfile in
/var/adm/postinstall/<id>
where <id> is a automatically generated unique id. The logfile has the same
format as the flist files and so contains the package name and filename of
every file touched (removed, added or modified) by mine.
The shell-script 'postinstall' (installed in /usr/sbin) sets some shell
functions and then sources all files in the /etc/postinstall.d directory.
The shell functions defined by 'postinstall' can be used to check if files
matching a pattern are contained in the liggering postinstall logfiles.
That way e.g. glibc can install a postinstall which runs ldconfig whenever
files matching '.*\.so' are removed, added or modified. After all
postinstall scripts are executed, the files in /var/adm/postinstall are
removed.
When the option -a is passed to 'postinstall', the check function always
returns true and so forces all the postinstall scripts to do everything
they can do. This is e.g. usefull when packages are installed manually.
The files in /var/adm/postinstall aren't touched in this mode.
The 'rocket' script would run 'postinstall' automatically after installing
or removing packages. The 'mine' command itself wouldn't run 'postinstall'.
"You can now flame me, I am full of love" ;-)
yours,
- clifford
--
Optimization is easy:
39. Make it right before you make it faster.
43. Let the compiler do the simple optimizations.
46. Keep it simple to make it faster.
47. Don't diddle code to make it faster - find a better algorithm.
48. Instrument your programs. Measure before making "efficiency" changes.
-- from "The Elements of Programming Style" by Kernigham and Plauger
Prof: So the American government went to IBM to come up with
a data encryption standard and they came up with ...
Student: EBCDIC!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://www.rocklinux.net/pipermail/rock-devel/attachments/20050414/290b1a2c/attachment.bin
More information about the rock-devel
mailing list