RFC: postinstall scripts
Clifford Wolf <[email protected]>
| Newsgroups | gmane.linux.distributions.rock.devel |
|---|---|
| Message-ID | <[email protected]> |
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! _______________________________________________ rock-devel mailing list [email protected] http://www.rocklinux.net/mailman/listinfo/rock-devel
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (GNU/Linux) iD8DBQFCXsFbPNIEsfpKDdERAisCAKCWa03H5PkGkIHiLoYX/3aNsj839QCfeoTr fXjS3+mdEZE8+Qe4PaO2T/A= =vauq -----END PGP SIGNATURE-----