[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Use of rpm --root to build a cross root filesystem: pre/post/preun/postun scripts problem
- From: "Patrick Monnerat" <Patrick Monnerat datasphere ch>
- To: <rpm-list redhat com>
- Subject: Use of rpm --root to build a cross root filesystem: pre/post/preun/postun scripts problem
- Date: Thu, 9 Mar 2006 15:50:03 +0100
Hi everybody,
I use "rpm --root ..." to build a cross root filesystem. Some of the
packages I install start, restart or stop a daemon from their
install/erase scripts. These actions are NOT appropriate in my case,
since it interacts with the runtime status. They may stop a running host
daemon, start a chrooted one, preventing to unmount the cross filesystem
after building it.
An install/erase script runs configuration commands (their "life" period
is contained in the scripts's one) and occasionally starts or stops
daemons (their life extends prior or after the script's one),
mounts/remounts filesystems, change /proc parameters, etc.
I want to modify the scripts to test for the condition above before
starting or ending a daemon, or alterate the running system state.
I have searched in vain how the scripts can detect they are chrooted
(Comparing "/" inode to 2 is neither portable, nor reliable!). Does
anybody has a clue ?
The only way I see by now is to make an easy extension to rpm to prepend
some symbol definition like "RPM_CHROOTED=1/0", or
"RPM_ROOT=<root_path>" to the scripts before executing them, depending
on --root given.
Thanks in advance for your ideas... or actions ;-)
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]