Use of rpm --root to build a cross root filesystem: pre/post/preun/postun scripts problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 
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 ;-)

_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/rpm-list

[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux